P
Patricio
Hello,
I having trouble connecting to a WCF Service hosted in a Windows Service.
I implemented the Windows Service as explained here: http://msdn.microsoft.com/en-us/library/bb332338.aspx
Here are the scenarios:
1) If I self-host the WCF Service then I can access it from the host PC
and from remote PCs.
2) If I host the WCF Service in a Windows Service then I can access it
from the host PC but not from remote PCs.
I have tried running the Windows Service under different users with the same
result (LocalSystem, NetworkService, a domain user, a local administrator,
etc.)
The error I get is:
System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://<server>:8008/WcfService.
The connection attempt lasted for a time span of 00:00:20.8404150. TCP error
code 10060: A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection failed
because connected host has failed to respond <IP>:8008. ---> System.Net.Sockets.SocketException:
A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond 10.5.22.194:8008
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress
socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri
uri, TimeSpan timeout)
My config for the self-hosting and the Windows Service is:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="<service name>">
<endpoint address="net.tcp://localhost:8008/WcfService"
binding="netTcpBinding"
bindingConfiguration="TcpBindingConfiguration"
contract="<contract name>" />
</service>
</services>
<bindings>
<netTcpBinding>
<binding name = "TcpBindingConfiguration">
<security mode="None"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
I have set the security to "None" for now to make sure I am not running into
security issues.
Thank you for your help,
Patricio.
I having trouble connecting to a WCF Service hosted in a Windows Service.
I implemented the Windows Service as explained here: http://msdn.microsoft.com/en-us/library/bb332338.aspx
Here are the scenarios:
1) If I self-host the WCF Service then I can access it from the host PC
and from remote PCs.
2) If I host the WCF Service in a Windows Service then I can access it
from the host PC but not from remote PCs.
I have tried running the Windows Service under different users with the same
result (LocalSystem, NetworkService, a domain user, a local administrator,
etc.)
The error I get is:
System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://<server>:8008/WcfService.
The connection attempt lasted for a time span of 00:00:20.8404150. TCP error
code 10060: A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection failed
because connected host has failed to respond <IP>:8008. ---> System.Net.Sockets.SocketException:
A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond 10.5.22.194:8008
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress
socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri
uri, TimeSpan timeout)
My config for the self-hosting and the Windows Service is:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="<service name>">
<endpoint address="net.tcp://localhost:8008/WcfService"
binding="netTcpBinding"
bindingConfiguration="TcpBindingConfiguration"
contract="<contract name>" />
</service>
</services>
<bindings>
<netTcpBinding>
<binding name = "TcpBindingConfiguration">
<security mode="None"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
I have set the security to "None" for now to make sure I am not running into
security issues.
Thank you for your help,
Patricio.