2

我们开发了一个 WCF 服务(在 windows server 2012 上运行)和客户端 API,它们通过客户端证书身份验证相互连接。在我们对系统进行压力测试之前,它们运行得很好。我们尝试用大量数据加载系统,然后系统响应如此缓慢。所以我们中断进程并尝试清除 DB。清除和重新索引数据库花费了 6 个多小时。之后 WCF 服务停止响应!但是我们没有更改任何代码块!因此,我认为该错误不是由我们的代码引起的。

wcf 客户端尝试连接服务时收到的错误消息如下

System.ServiceModel.Security.MessageSecurityException:HTTP 请求被客户端身份验证方案“匿名”禁止。---> System.Net.WebException:远程服务器返回错误:(403)禁止。在 System.Net.HttpWebRequest.GetResponse() 在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- 内部异常堆栈跟踪结束 ---

服务器堆栈跟踪:在 System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory1 factory) at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory1 工厂,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)

我发现了一个与我的问题非常接近的类似未回答的问题。使用 WCF 要求 SSL 会导致“客户端身份验证方案‘匿名’禁止 HTTP 请求”错误?

可能是什么问题?什么是解决方案?有什么想法吗?

4

0 回答 0