1、错误信息:
异常详细信息: System.Web.HttpException: 超过了最大请求长度。
2、解决方法
在项目web.config文件上添加如下配置:添加允许上传文件长度设置为1G
<system.web>
<!--最大请求长度,单位为KB(千字节),默认为4M,设置为1G,上限为2G -->
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
</system.web>
<system.webServer>
<!--允许上传文件长度,单位字节(B),默认为30M,设置为1G,最大为2G -->
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824"/>
</requestFiltering>
</security>
</system.webServer>