Why can I not run GMS service on the same port as IIS if I am using a different IP address?
I am trying to run one of the GMS services on the same port as IIS. I am using the IP Flexibility option to force the GMS service to only bind to a specific IP address, and have told IIS to bind to a different IP address. However whenever my server is rebooted IIS fails to start correctly as it is unable to bind to the allocated IP address.
This is due to the fact that IIS expects all IP addresses to be free on the ports it tries to bind to, i.e. it attaches to all IP addresses in the first instance and then releases the ones that it does not want. In contrast, GMS will only attach to the IP addresses that you have
There is a fairly straightforward workaround for this IIS problem which involves editing the registry to ensure that IIS loads before the GMS service that is configured to use the same port. That is, delay GMS until IIS has started so that GMS can then use the IP addresses without IIS complaining. However, doing this will mean that GMS is not available immediately on startup and will depend upon the correct operation of IIS. In other words, if IIS were to fail to start, your messaging system may not be available as a result.
It is sometimes possible to configure IIS to only use certain ports and IP addresses. There is a program in the IIS installation disk called httpcfg.exe which will allow control of the IIS ports. The option DisableIPSpooling and DisableSocketSpooling will need to be checked.
Open regedit32.exe and go to HKey_Local_MachineSystemCurrentControlSetServices<service name> then add a value of type MULTI_SZ called "DependOnService" and for the Data give it the name of the IIS service, entered on a single line.
Replace <service name> with the name of the GMS service you want to run on the same port as IIS.
Reboot the server and the GMS service specified will not attempt to start until IIS has fully loaded.
Keywords:service port IP address IIS IP Flexibility IPConnect Connections