I have an application binding on port IP1:80 of a machine with 5 virtual IP addresses (IP1-IP5)
I then try to bind a self-hosted WCF service to IP5:80 but get an AlreadyInUseException. I guess WCF is trying to bind to the entire IP range, despite the fact that I specify a specific one.
Is this known behaviour?
[start application that binds to IP1:80]
string baseAddress = "http://IP5:80/binary";
ServiceHost host = new ServiceHost(typeof(BinaryService),
new Uri(baseAddress));
host.AddServiceEndpoint(typeof(IBinaryService), GetBinding(), "")
.Behaviors.Add(new WebHttpBehavior());
host.Open(); // exception
Found the solution:
After this, self-hosted WCF app will not try and bind to the full range on 80, just IP5!