相关疑难解决方法(0)

超出最大请求长度.

当我尝试在我的网站上传视频时,我收到错误最大请求长度超出.

我该如何解决?

asp.net iis file-upload

1008
推荐指数
11
解决办法
70万
查看次数

ASP.NET自定义错误页面 - Server.GetLastError()为null

我为我的应用程序设置了自定义错误页面:

<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx"
/>
Run Code Online (Sandbox Code Playgroud)

在Global.asax,Application_Error()中,以下代码用于获取异常详细信息:

  Exception ex = Server.GetLastError();
  if (ex != null)
    {
        if (ex.GetBaseException() != null)
            ex = ex.GetBaseException();
    }
Run Code Online (Sandbox Code Playgroud)

当我到达我的错误页面(〜/ errors/GeneralError.aspx.cs)时,Server.GetLastError()为null

有没有什么办法可以在错误页面上获取异常详细信息,而不是在Global.asax.cs中?

Vista/IIS7上的ASP.NET 3.5

asp.net web-applications exception custom-error-pages

111
推荐指数
6
解决办法
11万
查看次数

客户端已断开连接

我经常收到Client Disconnected消息.我不使用负载平衡 - 只有一个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)
Run Code Online (Sandbox Code Playgroud)

iis disconnected-session

14
推荐指数
2
解决办法
8802
查看次数

在提供页面之前确定ASP.NET页面视图状态的大小

我可以编写什么ASP.NET页面生命周期事件来确定发送的视图状态的大小?此外,是否可以在不解析渲染的HTML(如页面对象上的属性)的情况下确定大小,还是解析唯一的方法?

我想要做的是记录尺寸,特别是如果它们超过某个阈值.

asp.net viewstate

5
推荐指数
1
解决办法
1316
查看次数