zoukankan      html  css  js  c++  java
  • Web 服务器上的请求筛选被配置为拒绝该请求,因为内容长度超过配置的值

    ASP.NET 网站上传文件超过4M时会出现Web 服务器上的请求筛选被配置为拒绝该请求,因为内容长度超过配置的值 的错误
    解决方案:

    修改web.config中 system.web/ httpRuntime.maxRequestLength
    修改web.config中 system.webServer/ security/ requestLimits.maxAllowedContentLength

    <system.web>
         <httpRuntime maxRequestLength="4096" />
    </system.web>
     
    <system.webServer>
        <security>
           <requestFiltering>
            <requestLimits maxAllowedContentLength="30000000" />
          </requestFiltering>
        </security>
     </system.webServer>

    参考配置:

     <system.web>
        <compilation debug="true" targetFramework="4.6.2" />
        <httpRuntime maxRequestLength="1048576000" executionTimeout="3600" targetFramework="4.5" />
     </system.web>
    
    <system.webServer>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="104857600" />
          </requestFiltering>
        </security>
    </system.webServer>

  • 相关阅读:
    响应式设计工作总结
    首页性能指标
    前端工作小结
    html5、css3小应用
    循环滚动实例
    程序员修炼之道笔记(转)
    一个操作系统的实现(1)
    scrum role
    一个操作系统的实现(3)
    awk&sed story
  • 原文地址:https://www.cnblogs.com/ShaYeBlog/p/11166873.html
Copyright © 2011-2022 走看看