Hello everyone.
I'm trying to create WCF Service App (that is
hosted on IIS under Win XP Pro) with wsDualHttpBinding support. The
idea is quite simple - create smth like chat server but host it withing
IIS.
I've got such a problem: in client's app.config I manually set clientBaseAddress="http://localhost:8000/client"
and when I try to launch 2 client console app's I get next exception:
HTTP could not register URL http://+:8000/client/. Another application has already registered this URL with HTTP.SYS.
Is there possibility to enable port sharing for HTTP, or only TCP available?
If no - if it's possible to launch console app from web service?
Loading
AlexeyPosted Feb 21, 2008, 10:29 AM
Just added this code after creating ServiceClient and before connecting to ServiceHost.
WSDualHttpBinding binding = (WSDualHttpBinding)client.Endpoint.Binding;
string clientCallbackAddress = binding.ClientBaseAddress.AbsoluteUri;
string clientCallbackAddress += Guid.NewGuid().ToString();
binding.ClientBaseAddress = new Uri(clientCallbackAddress);
this code adds a 'tail' to binding address thus making it unique for each instance.