WCF Service stop responding unexpectedly with error “client authentication scheme 'Anonymous'.The remote server returned an error: (403) Forbidden.”

五迷三道 提交于 2019-12-24 01:25:45

问题


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, HttpChannelFactory1 factory) at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory1 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!