We have a WCF service with several clients for planning operations between clients. He did an excellent job with XP. Going to win7, I can only connect the client to a server on one computer. At the moment, I think this is due to IPv6, but I'm at a dead end on how to proceed.
A client trying to connect to a remote server gives the following exception:
System.ServiceModel.EndpointNotFoundException: Failed to connect to net.tcp: //10.7.11.14: 18297 / zetec / Service / SchedulerService / Scheduler. The connection attempt continued for a period of 00: 00: 21.0042014. Error code 10060 TCP: The connection attempt failed because the connected party did not respond properly after a certain period of time or failed to establish a connection because the connected host was unable to respond 10.7.11.14:18297. ---> System.Net.Sockets.SocketException: the connection attempt failed because the connected party did not respond properly after some time or the connection failed because the connected host could not respond 10.7.11.14:18297
The service is configured as follows:
<system.serviceModel> <services> <service name="SchedulerService" behaviorConfiguration="SchedulerServiceBehavior"> <host> <baseAddresses> <add baseAddress="net.tcp://localhost/zetec/Service/SchedulerService"/> </baseAddresses> </host> <endpoint address="net.tcp://localhost:18297/zetec/Service/SchedulerService/Scheduler" binding="netTcpBinding" bindingConfiguration = "ConfigBindingNetTcp" contract="IScheduler" /> <endpoint address="net.tcp://localhost:18297/zetec/Service/SchedulerService/Scheduler" binding="netTcpBinding" bindingConfiguration = "ConfigBindingNetTcp" contract="IProcessingNodeControl" /> </service> </services> <bindings> <netTcpBinding> <binding name = "ConfigBindingNetTcp" portSharingEnabled="True"> <security mode="None"/> </binding> </netTcpBinding > </bindings> <behaviors> <serviceBehaviors> <behavior name="SchedulerServiceBehavior"> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceThrottling maxConcurrentSessions="100"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel>
The client connects like this:
String endPoint = "net.tcp://" + GetIPV4Address(m_SchedulerHostAddress) + ":" + m_SchedulerHostPort.ToString(CultureInfo.InvariantCulture) + "/zetec/Service/SchedulerService/Scheduler"; NetTcpBinding binding = new NetTcpBinding(); binding.Security.Mode = SecurityMode.None; m_Channel = new DuplexChannelFactory<IProcessingNodeControl>(this, binding, endPoint); m_IProcessingNodeControl = m_Channel.CreateChannel();
I checked my firewall about a dozen times, but I think there might be something that I don’t see. Tried to disable the windows firewall. I tried changing localhost to my ipv4 address to try to stay away from ipv6, I tried to remove any anti-ipv6 code.
I don’t know what this means, but:
Microsoft Telnet> open 10.7.11.14 18297
Connecting to 10.7.11.14 ... Could not open connection with host, on port 18297: Could not connect
The telnet test, unfortunately, is not the key. I successfully connected to my service port from the local host and the remote computer when the service is running, but my client did not work from the remote computer.
It seems that connecting to localhost is not always guaranteed. The desktop (win7 / 32) is working, the laptop (win7 / 64) is not working. However, other win7 / 64 boxes work. Perhaps due to repeated reception on a laptop? Also does not explain connection failures to tester systems.
I installed two win7 machines with IPv6 completely disabled (using 0xffffffff, as in http://support.microsoft.com/kb/929852 ). No help.