ASP.NET上传大文件404报错

报错信息:

 Failed to load resource: the server responded with a status of 404 (Not Found)

尝试1:

仅修改Web.config中system.web的值

  <system.web>
    <compilation debug="true" targetFramework="4.6.1" />
    <httpRuntime maxRequestLength="1024000" requestLengthDiskThreshold="100" executionTimeout="600" />
  </system.web>

结果:失败

尝试2:

在修改Web.config的基础上修改iis请求筛选中运行最大的值

结果:失败

扫描二维码关注公众号,回复: 4349360 查看本文章

最总尝试:

1.修改Web.config中system.web的值为

<system.web>
    <compilation debug="true" targetFramework="4.6.1" />
    <httpRuntime maxRequestLength="1024000" requestLengthDiskThreshold="100" executionTimeout="600" />
  </system.web>

2.在后面添加system.webServer

<system.webServer>
    <security>
      <requestFiltering >
        <requestLimits maxAllowedContentLength="1073741824" ></requestLimits>
      </requestFiltering>1
    </security>
  </system.webServer>

结果:成功

猜你喜欢

转载自www.cnblogs.com/ladyzhu/p/10060681.html