I’m getting the following error when trying to connect to a WCF web service:
WCF web query ...
Unhandled Exception: 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.
at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message
message, EndpointAddress target)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingM
essageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
I’ve written both the WCF client and the server apps in C#. The client talks to the server nicely when its running locally, but falls over with a certificate request error when I make the same call to the remote server copied to remote Amazon EC2 cloud computer.
How do I temporarily switch off certificate requests in WCF, just so I can see if everything is working properly?
Got it! Switched off security. I can now talk to the remote WCF service, it all works perfectly.
The key is to run the WCF Configuration tool to change the transport layer to basicHTTP binding, and make sure security is turned off by default. Here’s the steps.
Here is the completed App.config: