We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS 8 in parallel with other web services on Windows 2012 R2RSS

1 reply

Last post Jun 04, 2015 12:04 PM by CDCDeveloper

  • IIS 8 in parallel with other web services on Windows 2012 R2

    Jan 29, 2014 10:38 AM|Tron 42|LINK

    OS: Windows 2012 R2 x64 EN
    Web servers: IIS 8.5.9600.16384 (short IIS), Google Go 1.2 web service (short GO)

    My network adapters are using three IP4 addresses:

    • a
    • b
    • c

    The IIS runs two sites: A, B and the binding is

    • A>a:80
    • B>b:80
    • B>b:443

    I configured the IIS to listen to a and b as follows:

    • netsh http add iplisten ipaddress=a
    • netsh http add iplisten ipaddress=b

    The command netsh http show iplisten shows:

    • a
    • b

    The Google Go Webservice runs on IP4 address:

    • c

    Situation: This config runs fine on Windows 2008 R2. On Windows 2012 R2 it seems to run at first BUT after restarting the server the Google Go Webservice is running but the sites A and B are stopped. However I can start them manually and all three sites are operational again.

    Approach 1: The sites A and B are running. Now I disable the Google Go Webservice and restart the service. But the sites A and B are still stopped after the restart.

    Approach 2: (the Go Webservice is still disabled) I now add the global IP address 0.0.0.0 for the IIS to listen. So netssh http show iplisten shows: 0.0.0.0, a, b. After the restart the sites A und B are still running. However listening on 0.0.0.0 does prevent the Google Go Webservice from running because his IP and port is now blocked by the IIS.

    Question 1: Why does the IIS need the 0.0.0.0 IP address to start the sites? To me this looks like a problem in Windows Server 2012 R2.

    Question 2: the problem amplifies if the server configuration needs to be changed. The WinRM service is involved in the installation of roles and features. If the IIS does not listen to 0.0.0.0 any changes to roles and configuration will fail in the Wizard with "the WinRM service is not available". In my situation I have to enable listening to 0.0.0.0 then I can make the config changes and then I have to remove the binding again to allow GO to run.

    You can also simplify the scenario. Leave other web services out and just order Windows 2012 R2 to listen to specific IP addresses. Starting from this point the IIS will not start his sites. If you add IP 0.0.0.0 again they will start.

    The capability of the IIS to listen to specific IP adresses is an important prerequisite to run other web services in parallel. If the IIS needs to listen to IP 0.0.0.0 it will not be possible to run other web services. The other services (started manually or automatically) will not start because they will be in conflict with the IIS listening on 0.0.0.0. Thus I think this dependency on 0.0.0.0 is a bug in Windows 2012 R2.

    My workaround for this issue is that I have written a small service that will start all sites of the IIS manually after the server has been booted. Quite horrible and I hope Microsoft will fix this soon.

    Thanks for your support.

  • Re: IIS 8 in parallel with other web services on Windows 2012 R2

    Jun 04, 2015 12:04 PM|CDCDeveloper|LINK

    I just want to follow up that I am also experiencing this issue with Windows Server 2012 R2 and multiple IP addresses.  Here is the information on my problem and work around:

    Server 2012 R2 Multiple IP with IIS Issue:

    Pre Problem Condition:

    Production Windows 2008 R2 with IIS Role hosting two websites with two IP addresses. 

    • One IP address for IIS: xxx.xxx.xxx.43 listening on ports 80 and 443.  Websites using host header redirection.
    • One IP for an in-house proxy service (.Net 4): xxx.xxx.xxx.89 listening on port 80.
    • The machine was configured using the netsh http add iplisten for IP address xxx.xxx.xxx.43 so IIS would not listen on all IP addresses thus freeing xxx.xxx.xxx.89 for the proxy service.

    Problem Initial Condition:

    A replacement server was procured and Windows Server 2012 R2 was installed with the IIS Role.  IIS was configured manually to host the two websites similar as before and the websites were moved to the new server with no issues.  As before the machine was configured with two IP addresses.

    • One IP address for IIS: xxx.xxx.xxx.43 listening on ports 80 and 443.  Websites using host header redirection.
    • One IP for an in-house proxy service (.Net 4.5.2): xxx.xxx.xxx.89 listening on port 80.

    Problem:

    When the server was configured using the netsh http add iplisten to prevent IIS for listening on both IP addresses the installation (IIS and the proxy service) worked initially.  However after a system restart, IIS had errors and stopped the two websites.  The proxy application also had errors and stopped its service.

    IIS Errors:

    • 15005 - Unable to bind to the underlying transport for xxx.xxx.xxx.43:80. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine.  The data field contains the error number.
    • 15005 - Unable to bind to the underlying transport for xxx.xxx.xxx.43:47001. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine.  The data field contains the error number.
    • 1004 - The World Wide Web Publishing Service (WWW Service) did not register the URL prefix http://www.website.net:80: xxx.xxx.xxx.43/ for site 1. The site has been disabled. The data field contains the error number.
    • 1004 - The World Wide Web Publishing Service (WWW Service) did not register the URL prefix http://sim.website.net:80: xxx.xxx.xxx.43/ for site 2. The site has been disabled. The data field contains the error number.

    Proxy Errors:

    • Invalid IP Address

    Even with the above errors, the websites could be started manually and the proxy service could be restarted successfully after the system had fully started up.  By starting the websites and proxy service manually after the restart, all functionality was restored until the system was restarted at which time the problem repeated.

    Interim Solution 1:

    The netsh http delete iplisten for IP address xxx.xxx.xxx.43 was issued allowing IIS to listen on all IP addresses (0.0.0.0:80).  With this change, IIS no longer had errors at startup and the websites started without issue.  The proxy service and secondary IP address (xxx.xxx.xxx.89) were removed, and temporarily moved to another server without IIS.

    Interim Solution 2:

    The secondary IP address (xxx.xxx.xxx.89) and proxy service were added back to the server and it was configured with netsh http add iplisten to prevent IIS for listening on both IP addresses.  This caused the errors listed above.  A Windows Service was written to the automatically start the web sites in IIS and the proxy service after the errors occur each time Windows starts up.

    Desired Solution: 

    A method to prevent IIS from binding to all IP addresses (or select which addresses it can bind to) is needed to allow other applications with TCP listeners to reside on the same machine.