最大请求长度超出例外
发布时间:2020-12-15 23:10:37 所属栏目:asp.Net 来源:网络整理
导读:我正在尝试使用上传控件上传一个20兆文件,它在visual studio的内置webserver中工作正常,但一旦我发布到生产服务器(我无法访问),我会收到以下错误: Server Error in '/' Application.---------------------------------------------------------------------
我正在尝试使用上传控件上传一个20兆文件,它在visual studio的内置webserver中工作正常,但一旦我发布到生产服务器(我无法访问),我会收到以下错误:
Server Error in '/' Application. -------------------------------------------------------------------------------- Maximum request length exceeded. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Maximum request length exceeded. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): Maximum request length exceeded.] System.Web.HttpRequest.GetEntireRawContent() +11140903 System.Web.HttpRequest.GetMultipartContent() +72 System.Web.HttpRequest.FillInFormCollection() +245 System.Web.HttpRequest.get_Form() +119 System.Web.HttpRequest.get_HasForm() +11072199 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +124 System.Web.UI.Page.DeterminePostBackMode() +83 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) +270 -------------------------------------------------------------------------------- 我已将以下内容添加到我的system.web节点,所以我不知道真正的问题是什么. <httpRuntime executionTimeout="800" maxRequestLength="51200" /> 这方面的任何方向都是非常有帮助的. 解决方法
你可以看看
here.
它指出相同的解决方案,但描述为什么. 这是微软的方式:here (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Asp.NET MVC视图中的引用
- asp.net – Page_ClientValidate()与多个ValidationGroups
- asp.net-mvc – IIS不允许MVC应用程序控制Azure上的错误消息
- razor – 从ASP.net Core 2中的视图访问自定义ApplicationU
- ASP.NET - 将 ASP.NET 用作高性能文件下载器
- asp.net – Sitecore – 以编程方式清除用户的缓存
- 在ASP.NET应用程序中使用out-of-process会话状态的SQL Serv
- asp.net – 如何从RouteData获取路由名称?
- asp.net-mvc – 如果Roles为空,则默认情况下使AuthorizeAtt
- .net – 洋葱建筑中的依赖性解析