问题
we developed a WCF service ( running on windows server 2012) and client API which are connected each other with client certificate authentication. They were running cool up to we made a stress test on system. We try to load system with giant data then the system responds so slowly. So we interrupt the process and try to clear DB. The clearing and reindexing DB took more than 6 hours. After that the WCF service stoped responding! But we did not change any code block! Therefore, I think that the error is not caused by our code.
the error message that wcf client get when try to connect service is below
System.ServiceModel.Security.MessageSecurityException: The HTTP request was forbidden with client authentication scheme 'Anonymous'. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace ---
Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory
1 factory) at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory
1 factory, WebException responseException, ChannelBinding channelBinding) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
I found a similar unanswered question which is so close to my question. ( Requiring SSL with WCF causes "The HTTP request was forbidden with client authentication scheme 'Anonymous'" error?)
What can be the problem? and What can be the solution? Is there any ideas?
来源:https://stackoverflow.com/questions/16979346/wcf-service-stop-responding-unexpectedly-with-error-client-authentication-schem