可能导致“客户端已断开连接”的原因 ASP.NET 异常?
我的 .NET 3.5 应用程序偶尔会引发以下异常 System.Web 异常:
客户端已断开连接
为什么会出现这个异常? 我的应用程序正在负载平衡的 Windows Server 2003 IIS 6.0 服务器上运行。
My .NET 3.5 application sporadically throws the following exception System.Web exception:
The client disconnected
Why is this exception occurring? My application is running on a load balanced Windows Server 2003 IIS 6.0 server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
vbdork.net 域现在似乎已不复存在。 在搜索这个错误时,我发现了这篇文章的几个参考文献。 所以我找到了它的谷歌缓存版本,现在将其发布在这里以供参考。 原始网址为: http://vbdork.net/post/ 2009/02/10/The-client-disconnected.aspx
The vbdork.net domain seems to now be defunct. In searching on this error, I found several references to this article. So I found a google cached version of it and am now posting it here for reference. The original URL was: http://vbdork.net/post/2009/02/10/The-client-disconnected.aspx
也许是因为“客户端已断开连接”...
关闭浏览器,导航到新页面,厌倦了等待应用程序加载...
严肃地说,请查看 此页面 有关该问题的大量信息。
总之,发生这种情况是因为浏览器正在发起一个新请求,该请求会在第一个服务器处理原始请求时退回到第二个服务器。 他的建议是忽略它。
我的建议是弄清楚为什么您的负载均衡器没有在后续请求中将客户端固定到同一服务器; 也称为“粘性”会话。
Perhaps because the "client disconnected"...
Closed browser, navigating to a new page, tired of waiting for the app to load...
In all seriousness, check out this page for a lot of information on that problem.
In summary it's happening because the browser is initiating a new request that bounces to the second server while the first server is processing the original request. His advice is to simply ignore it.
My advice would be to figure out why your load balancer isn't keeping the client tacked to the same server on subsequent requests; also called "Sticky" sessions.
如果您使用 Telerik 组件,请删除 RadCompression 模块。
If you are using Telerik components, get rid of RadCompression module.
另请查看有关类似问题的此答案。 在这种情况下就没有网络农场。
感谢 Russell Clarvoe
Also check out this answer on a similar question. There is no web farm in that case.
Credit to Russell Clarvoe
尝试通过使用 web.config 中的 maxPageStateFieldLength 将视图状态分块为多个字段来修复:
attempt to fix by chunking the viewstate into multiple fields using maxPageStateFieldLength in the web.config:
其他可能的原因:
您使用的控件实际上不支持 Ajax。
Ajax 应该能够处理异步请求,但某些控件不起作用,例如 telerik (ajax) 树视图。
(像往常一样,等待 Telerik 网络警察来审查这种不良宣传。)
Other likely causes:
You're using controls that do not support Ajax in reality.
Ajax is supposed to be able to handle async requests, but some controls don't work, such as the telerik (ajax) treeview.
(Awaiting the telerik internet police to come censor this bad publicity, as usual.)