客户端已断开连接

时间:2009-06-10 22:13:39

标签: iis disconnected-session

我经常收到客户端断开连接的消息。我不使用负载平衡 - 只有一个IIS服务器。我需要知道导致这种情况的原因以及解决方法。

以下是异常信息:

Type: System.Web.HttpException
Message: The client disconnected.

Exception Data: 

Source: System.Web

TargetSite: Void ThrowError(System.Exception, System.String, System.String, Boolean)

StackTrace: 
   at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
   at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
   at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
   at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
   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)

3 个答案:

答案 0 :(得分:8)

我们也得到了这个例外,我们以完全可重复的方式获得它。当ViewState变得“大”并且用户在上一个请求完成之前单击按钮时,抛出此异常...

在我们的情况下,这很容易发生,因为回发使用的是ajax,因此浏览器在ViewState发送到服务器时不会停止响应。单击此控件会一遍又一遍地导致异常。

答案 1 :(得分:2)

当您的页面允许最终用户进行多次部分回发而不等待响应时,也会发生这种情况。意思是,假设一个表单击一行进行部分回发并向他显示该行的详细信息。现在,如果用户只有一行而没有等待详细信息,请单击另一行......可能会发生此异常。

当发出新的异步请求时,ASP.NET AJAX放弃了已经执行的请求。

然而,仍然没有理解的是为什么IIS允许这样的放弃请求完全到达ASP.NET。

答案 2 :(得分:1)

用户可能通过单击浏览器中的STOP或RELOAD来中止页面后退。您的应用程序是否有一些非常重的页面,例如很多viewstate,你有没有慢速连接的用户,例如拔号?