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>

  • 相关阅读:
    发一注册表监控驱动代码
    Nikto
    在c#使用IOCP(完成端口)的简单示例
    C#中ref和out的使用小结
    Powerful x86/x64 Mini HookEngine
    C语言写的多线程下载器
    快速排序算法c#
    拓扑排序
    Dijkstra算法
    SRM 550 DIV2
  • 原文地址:https://www.cnblogs.com/ShaYeBlog/p/11166873.html
Copyright © 2011-2022 走看看