We have already blogged about how to use the HTTP.sys transport (TkbmMWHTTPSysServerTransport) with kbmMW in a previous Fish fact blog.
However what if you want to host multiple kbmMW based servers using the HTTP.sys transport on the same server?
Often you may end up with an error message like “Unable to bind to the underlying transport for … The IP Listen-Only list may contain a reference to an interface which does not exist on this machine.” or “Unable to open file….”.
The thing is that Windows require you to define which hosts the server is allowed to listen on.
Putting an URL in the URLs property of the TkbmMWHTTPSysServerTransport component, is not enough.
Lets say your server is known by multiple public IP addresses. You want to start your kbmMW based application/web server up on one of them, so you can have other servers listening on the other IP addresses.
In that case you would set the URLs property to ‘http://x.x.x.x:y/’ where x.x.x.x is the public IP address and y is the port number (typically 80). However before you attempt to start the server up, you will additionally want to tell Windows that its quite OK for HTTP.sys to actually attempt listening on that IP address.
You do that by starting a command prompt in administrative mode (In Start, type cmd.exe and rightclick it and choose run as adminstrator).
Then type this command:
netsh http add iplisten x.x.x.x
Now you can start your server.
You can check which IP local network card (NIC) IP addresses Windows has been defined to let http.sys potentially listen on by typing:
netsh http show iplisten
And you can remove IP addresses by
netsh http delete iplisten x.x.x.x
9,650 total views, 63 views today