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请求筛选中运行最大的值

结果:失败

 

最总尝试:

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>

结果:成功

posted on 2018-12-03 20:31  ladyzhu  阅读(536)  评论(0编辑  收藏  举报

导航