You should be able to do this with one public IP address using some http.sys magic.
Assuming you are using Katana for your web host (the number of words and sample visual objects that you use to use Katana), then this should be as simple as starting the server using the domain name in the URL:
WebApp.Start("http://visualobjects.com:80", appBuilder => this.startup.Invoke(appBuilder));
This server with this URL will be registered in the basic HTTP HTTP Server API, and any HTTP request included in the Host: visualobjects.com header will be automatically redirected to this server. Repeat for any number of servers with their own hostname. This is the host routing that http.sys performs to host multiple websites on the same machine, as in IIS.
The problem you are facing is to reserve a host name that you must run under the elevated user account before opening the server. The service fabric has limited support for this in the form of endpoint configuration in ServiceManifest.xml:
<Resources> <Endpoints> <Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="80" /> </Endpoints> </Resources>
The limitation here is that no host name is specified, so Service Fabric will always register " http: // +: [port] ". Unfortunately, this does not work if you want to open the server by a specific host name - you only need to register the host name that you want to use. You must do this part manually using netsh ( and remove any endpoints for the same port from ServiceManifest.xml , otherwise it will override your hostname registration).
To manually register the host name with http.sys, you must run netsh for the host name, port, and user account under which your service starts, which is the default network service:
netsh http add urlacl url=http://visualobjects.com:80/ user="NT AUTHORITY\NETWORK SERVICE"
But you must do this from an elevated account on each machine on which the service will run. Fortunately, we have settings service entry points that can run with elevated account privileges .
change
One thing you will need to do for this to work is to open the firewall on the same port you are listening to. You can do this with the following:
<Resources> <Endpoints> <Endpoint Protocol="tcp" Name="ServiceEndpoint" Type="Input" Port="80" /> </Endpoints> </Resources>
Note that the protocol is tcp instead of http. This will open the firewall port, but will not override the http.sys registry that you configured with the .bat script.