I am confused why something is working. I configure the wcf service as follows:
<services> <service name="ClientCommand" behaviorConfiguration="SomeServiceBehavior"> <endpoint contract="IClientCommand" binding="netTcpBinding" BindingConfiguration="TcpPort" address="net.tcp://localhost:1304" /> </service> </services>
The configuration of BindingConfiguration and behaviorConfiguration is very simple, just setting up some timeouts.
In my exe, I run such a host.
_serverHost = new ServiceHost(type);
Everything is quite simple and works, I can call this service from another computer. However, after reading another problem (listening to tcp sockets), I get the impression that it should not work. How do I get attached to localhost, the service should not be accessible from outside the computer on which it runs?
I checked netstat on a PC and tied it to the IP address "0.0.0.0" instead of "127.0.0.1", explaining why it works from another computer.
But I do not understand why this comes from localhost to "0.0.0.0"?
source share