.net 用ajaxFileUpload 上传超过20M文件设置

1、在web.config的 <system.web>  节点里面添加   <httpRuntime targetFramework="4.5.2"  executionTimeout="3600" maxRequestLength="2048000" useFullyQualifiedRedirectUrl="false" />节点

        executionTimeout:超时时间  单位为秒

        maxRequestLength:文件最大KB   单位KB

2、在web.config的 <system.webServer>  节点里面添加  

    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="2097152000" maxQueryString="5000" maxUrl="8000"></requestLimits>
      </requestFiltering>
    </security>

 或 (2和3 是or 的关系只需要设置一个就可以了)

3、打开IIS管理服务器 单击发布的网站在右边双击打开<请求筛选>

   双击打开 选择  <隐藏段> 选项卡里面的web.config打开

 选中web.config右键 <选择编辑功能设置>

    修改红框里的两处,单位为字节   默认为30M

    1M=1048576字节

 

posted @ 2018-07-20 15:51  容忍的人其实并不是笨  阅读(652)  评论(1编辑  收藏  举报