When you use a WCF service, the following error occurs when the client invokes the service:
System.ServiceModel.Security.MessageSecurityException: An error is received from the other side that is not safe to handle or is not properly handled correctly. For error codes and more information,
See internal faultexception. ---> System.ServiceModel.FaultException: There is at least one security token in the message that cannot be validated.
---the end of the inner exception stack trace---
Server Stack Trace:
In System.ServiceModel.Channels.SecurityChannelFactory ' 1.securityrequestchannel.processreply (message reply, Securityprotocolcorrelationstate correlationstate, TimeSpan timeout)
In System.ServiceModel.Channels.SecurityChannelFactory ' 1.securityrequestchannel.request (Message message, TimeSpan Timeout
In System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation (securitysessionoperation Operation, EndpointAddress Target, Uri via, SecurityToken Currenttoken, TimeSpan timeout)
In System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore (TimeSpan timeout)
In System.IdentityModel.Selectors.SecurityTokenProvider.GetToken (TimeSpan timeout)
In System.ServiceModel.Security.SecuritySessionClientSettings ' 1.clientsecuritysessionchannel.onopen (TimeSpan Timeout
In System.ServiceModel.Channels.CommunicationObject.Open (TimeSpan timeout)
In System.ServiceModel.Channels.ServiceChannel.OnOpen (TimeSpan timeout)
In System.ServiceModel.Channels.CommunicationObject.Open (TimeSpan timeout)
In System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call (Servicechannel Channel, TimeSpan timeout)
In System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce (TimeSpan timeout, Calloncemanager Cascade)
In System.ServiceModel.Channels.ServiceChannel.EnsureOpened (TimeSpan timeout)
In System.ServiceModel.Channels.ServiceChannel.Call (String action, Boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs, TimeSpan timeout)
In System.ServiceModel.Channels.ServiceChannel.Call (String action, Boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs)
In System.ServiceModel.Channels.ServiceChannelProxy.InvokeService (IMethodCallMessage Methodcall, Proxyoperationruntime operation)
In System.ServiceModel.Channels.ServiceChannelProxy.Invoke (IMessage message)