重载 Web 服务时出现 System.ServiceModel.CommunicationException
我正在对我的网络服务进行负载测试
并得到 System.ServiceModel.CommunicationException
当我使用 10 个线程与之通信时(中间没有任何睡眠) - 基本上一次测试 10 个连接 - 通过 Windows 应用程序
接收对 http://localhost/XXX/XXXService.asmx。这可能是由于服务端点绑定不使用 HTTP 协议。这也可能是由于服务器中止 HTTP 请求上下文(可能是由于服务关闭)。有关更多详细信息,请参阅服务器日志。
为什么会发生这种情况以及如何最好地解决它 这
也是 ASP.NET 应用程序与其交互的方式 - 线程是进行负载测试的最佳方式
I am load testing my webservice
and get a
System.ServiceModel.CommunicationException
when I use 10 threads to communicate to it (without any sleep in between) - basically testing 10 conenctions at a time - through a windows application
An error occurred while receiving the HTTP response to http://localhost/XXX/XXXService.asmx. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
Why would this happen and how to best resolve it
Also is this the way how asp.net application will interact with it too - is threading the best way to do the load testing
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您可能想尝试使用 WCF 进行新的 Web 服务开发。 Microsoft 现在认为 ASMX Web 服务是“遗留技术”,并建议所有新开发都使用 WCF。
接下来,您可能想了解发生了什么。例外并不是在骗你。 HTTP 协议出现错误。您可以使用 Fiddler 查看网络流量,看看问题出在哪里。
您还可以查看服务器事件日志。
To begin with, you might want to try using WCF for new web services development. Microsoft now considers ASMX web services to be "legacy technology", and suggests that all new development use WCF.
Next, you might want to find out what happened. The exception isn't lying to you. There was an HTTP protocol error. You could look at the network traffic using Fiddler, to see what the problem is.
You might also look in the server event log.