本文介绍了是什么原因导致“客户端断开连接"? ASP.NET异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.NET 3.5应用程序偶尔会引发以下异常System.Web异常:

My .NET 3.5 application sporadically throws the following exception System.Web exception:

为什么会发生此异常?我的应用程序正在负载平衡的Windows Server 2003 IIS 6.0服务器上运行.

Why is this exception occurring? My application is running on a load balanced Windows Server 2003 IIS 6.0 server.

推荐答案

vbdork.net域现在似乎已失效.在搜索此错误时,我找到了对本文的一些引用.因此,我找到了它的google缓存版本,现在将其发布在这里以供参考.原始网址为: 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

用户选择一个具有回发事件的下拉列表框,但是在将请求发送回给用户之前,该用户再次执行此操作,该用户现在正在创建另一个事件,该事件正在另一台Web服务器上触发,以前的Web服务器尝试将旧事件的结果返回给用户,但该用户不再在那里,因为该用户现在位于另一个Web服务器上.

The user selects a drop down list box that has an event on postback, but the user does this again before the request is sent back to the user, the user is now creating a second event that is being fired on the other webserver, the previous webserver tries to return the results of the old event to the user but the user is no longer there because the user is now on the other webserver.

用户将永远不会看到错误,但是如果您发现错误并通过电子邮件发送/记录它们,您将看到如下所示的内容,并且会感到非常沮丧.不用担心,只要忽略它就不成问题,只要您捕获这种错误,就不会出错.

The user will never see an error, but if you're catching the errors and emailing/logging them you'll see them like shown below and be totally frustrated. Don't worry about it, just ignore it it's not even an problem, as long as you're trapping this kind of error nothing will go wrong.

Type : System.Web.HttpException, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Message : The client disconnected.
Source : System.Web
Help link :
ErrorCode : -2147467259
Data : System.Collections.ListDictionaryInternal
TargetSite : Void ThrowError(System.Exception, System.String, System.String, Boolean)
Stack Trace :    at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
           at System.Web.UI.HiddenFieldPageStatePersister.Load()
           at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
           at System.Web.UI.Page.LoadAllState()
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
           at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
           at System.Web.UI.Page.ProcessRequest()
           at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
           at System.Web.UI.Page.ProcessRequest(HttpContext context)
           at ASP.src_rptprefs_chainhierarchy_aspx.ProcessRequest(HttpContext context)
           at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
           at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

        Inner Exception
        ---------------
        Type : System.Web.UI.ViewStateException, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
        Message : Invalid viewstate.

Client IP: 10.21.4.8
Port: 46784
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET CLR 1.1.4322; MS-RTC LM 8)

这篇关于是什么原因导致“客户端断开连接"? ASP.NET异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 06:52
查看更多