I have 2 WCF services, each of which is hosted in its own console application.
They are located at:
net.tcp:
net.tcp:
everyone has their own contract. I want them to use the same port, so I read a lot on this issue and did the following:
- Enable tcp network sharing service.
- Register URL with 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
PortSharingEnabled=truein bindings for each WCF service - placement of each in its console application.
if I run both console applications, the second always gives this exception when calling the host method Open():
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 as in the same console application, everything works fine.
:, , .