WCF数据量实例分析
这篇文章主要讲解了"WCF数据量实例分析",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"WCF数据量实例分析"吧!
在作WCF数据量并发的测试,同时启动40个客户端进程,在碰到比较耗时的服务处理时,IIS服务器返回403错误。异常信息如下:]
System.ServiceModel.Security.MessageSecurityException: System.Net.HttpWebRequest.GetResponse()
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
Server stack trace:
System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response,
WebException responseException, HttpChannelFactory factory)System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request,
HttpWebResponse response, HttpChannelFactory factory, WebException responseException)System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.
WaitForReply(TimeSpan timeout) System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
terminal.ViolationService.IViolationService.QueryVioImg(String vioSeq)
terminal.ViolationService.ViolationServiceClient.QueryVioImg(String vioSeq),terminal.Program.Main(String[] args)
通过各种方法监控WCF数据量的错误消息,可是这些出错的调用都没有到达WCF,所有监测WCF的地方和WCF的TraceLog都没有任何的错误。随后又拿出***法宝wireshark,抓包也看不到任何错误,就是客户端请求了服务器一下,然后IIS就返回了403错误,并报告上面的异常。
于是把WCF的服务部署到了Win2003server的iis6下面。这样程序正常运行不会有任何错误。于是查了一下IIS5.1 造成403错误的原因。原来是IIS5.1的***连接数的问题。于是总结了一下:
同时修改了几个方面:
1.windowsXP SP3的TCP连接数,改为512。(有专门的工具破解)
2.WCF数据量会话数,调用数和实例数
感谢各位的阅读,以上就是"WCF数据量实例分析"的内容了,经过本文的学习后,相信大家对WCF数据量实例分析这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是,小编将为大家推送更多相关知识点的文章,欢迎关注!