In full:
System.ServiceModel.Security.SecurityNegotiationException The caller was not authenticated by the service. System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.
I see this when the WS call is cross domain on wsHttpBinding.
Quick and dirty is to remove the security (or move to basicHttpBinding).
Not recommended on a Production system but to get over the hump …
On the client side change:
<wsHttpBinding>
<binding name="WSHttpBinding_IService" >
<security mode="None" />
</binding>
</wsHttpBinding>
On the WS side change:
<system.serviceModel>
<services>
<service name=xxx">
<endpoint address="" binding="wsHttpBinding" contract="WcfServiceLibrary.IService" bindingConfiguration="NoSecurityConfig">
<identity>
<dns value="yyy" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="NoSecurityConfig">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
Essentially, the changes are to add the “security mode = None” and to add the new bindingConfiguration ="NoSecurityConfig" and then specify the binding for it.
Enjoy!
Thanks this post helped me...
ReplyDeleteGreat job man.
ReplyDeleteThis works for me
This works for me.
ReplyDeleteGreat job man
You are great.Nice solutions.
ReplyDelete