I previously asked a question to resolve the SecurityNegotiationException while trying to access a WCF service from a remote machine. That exception has been resolved thanks to the answer by ValtasarIII.
Now i have a different problem. I have hosted my service on a server and want to connect to it using a client application. But, when i try to Subscribe to the service from the client application, nothing happens and at the end i get the exception:
The open operation did not complete within the allotted timeout of 00:00:59.9939996. The time allotted to this operation may have been a portion of a longer timeout.
(I can share the stack trace if necessary)
Although when i try to test whether the service is running, i can successfully access it through the browser from the client machine.
Here are my configurations:
Service – web.config
<configuration>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="wsHttpDual">
<security mode="None">
<message clientCredentialType="None" algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<protocolMapping>
<add scheme="http" binding="wsDualHttpBinding" bindingConfiguration="wsHttpDual"/>
</protocolMapping>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Client – app.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_ISampleContract" clientBaseAddress="http://95.138.188.232:8000/myClient/">
<!--<security mode="Message">
<message clientCredentialType="Windows" algorithmSuite="Default" />
</security>-->
<security mode="None">
<message clientCredentialType="None" algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://95.138.188.232/autofxtools/service.svc"
binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_ISampleContract"
contract="ISampleContract" name="WSDualHttpBinding_ISampleContract">
<identity>
<servicePrincipalName value="host/95.138.188.232" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
I have searched for a solution but nothing has worked for me. The Service config seems to suggest no security requirement. But, the client with the same configuration actually works from the same machine as the Service but not off a remote machine. Does this mean that there still exists a Windows authentication (as per default for wsDualHttpBinding)? If so then where am i going wrong?
Hoping to get some positive feedback.
Regards.
This may be a firewall problem. I assume you’re hosting the service within ISS – are you sure that the respective ports are open? What happens when you try to access the service through a browser?
Also, I read in a German forum the following:
Which in English means: