I have 2 WCF services each hosted in its own console app.
they are hosted at:
net.tcp://computername:7777/Service1
net.tcp://computername:7777/Service2
each has its own contract. i want them to use the same port, so i read a lot on the subject, and did the following:
- Enabled the net tcp port sharing service.
- Registered the url`s using the commands:
netsh http add urlacl user=domain\username url=net.tcp://+:7777/Service1
netsh http add urlacl user=domain\username url=net.tcp://+:7777/Service2
- enabled the
PortSharingEnabled=true
on the bindings in for each WCF service - hosted each one in it`s own console app.
if i start both console apps, the second one always gives this exception on the call to the host's Open()
method:
AddressAlreadyInUseException. The transport manager failed to listen on the supplied
URI using the NetTcpPortSharing service: the URI is already registered with the
service.
when i host them both in the same console app, it all works just fine.
my question is: how to get it working when each service is hosted in it's own console app.