IIS 配置详解 请求长度限制调整
当上传一个超过30M的文件时,服务器会重定向至404.13页面,报错如下:
HTTP Error 404.13 - Not Found
The request filtering module is configured to deny a request that exceeds the request content length.
此请求的查询字符串的长度超过配置的 maxQueryStringLength 值

一、全局配置 C:\Windows\System32\inetsrv\config目录下的applicationhost.config (iis配置文件)
1. 配置节system.webServer/security/requestFiltering/ 下增加以下配置
maxAllowedContentLength的单位为Bytes
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="40000000" />
</requestFiltering>
<security>
<system.webServer>
二、局部配置
1. applicationhost.config允许配置覆盖, "Deny" to "Allow" like so: (IIS7.5 默认Allow)
<sectionGroup name="security">
<section name="access" overrideModeDefault="Deny" />
<section name="applicationDependencies" overrideModeDefault="Deny" />
<sectionGroup name="authentication">
<section name="anonymousAuthentication" overrideModeDefault="Deny" />
<section name="basicAuthentication" overrideModeDefault="Deny" />
<section name="clientCertificateMappingAuthentication" overrideModeDefault="Deny" />
<section name="digestAuthentication" overrideModeDefault="Deny" />
<section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Deny" />
<section name="windowsAuthentication" overrideModeDefault="Deny" />
</sectionGroup>
<section name="authorization" overrideModeDefault="Allow" />
<section name="ipSecurity" overrideModeDefault="Deny" />
<section name="isapiCgiRestriction" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="requestFiltering" overrideModeDefault="Allow" />
</sectionGroup>
2. Web。config文件 system.webServer/security/节下增加以下配置
<requestFiltering>
<requestLimits maxUrl="409600" maxQueryString="204800" maxAllowedContentLength="2097152" /> <!--单位字节Byte(2048000)-->
<fileExtensions> </fileExtensions>
</requestFiltering>
Web,config
<configuration>
<system.web>
</system.web>
</configuration>
【参考文献】https://blog.csdn.net/yw1688/article/details/49070633
IIS 配置详解 请求长度限制调整的更多相关文章
- Tomcat安装及配置详解
		Tomcat安装及配置详解 一,Tomcat简介 Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,Tomcat是Apache 软件基金会(Apache Software Found ... 
- Tomcat 优化方案 和 配置详解(转)
		转自 Tomcat 优化方案 和 配置详解 http://201605130349.iteye.com/blog/2298985 Server.xml配置文件用于对整个容器进行相关的配置. <S ... 
- Tomcat记录-tomcat常用配置详解和优化方法(转载)
		常用配置详解 1 目录结构 /bin:脚本文件目录. /common/lib:存放所有web项目都可以访问的公共jar包(使用Common类加载器加载). /conf:存放配置文件,最重要的是serv ... 
- tomcat常用配置详解和优化方法
		tomcat常用配置详解和优化方法 参考: http://blog.csdn.net/zj52hm/article/details/51980194 http://blog.csdn.net/wuli ... 
- Log4j配置详解(转)
		一.Log4j简介 Log4j有三个主要的组件:Loggers(记录器),Appenders (输出源)和Layouts(布局).这里可简单理解为日志类别,日志要输出的地方和日志以何种形式输出.综合使 ... 
- log4j.properties配置详解
		1.Loggers Loggers组件在此系统中被分为五个级别:DEBUG.INFO.WARN.ERROR和FATAL.这五个级别是有顺序的,DEBUG < INFO < WARN < ... 
- Log4J日志配置详解
		一.Log4j简介 Log4j有三个主要的组件:Loggers(记录器),Appenders (输出源)和Layouts(布局).这里可简单理解为日志类别,日志要输出的地方和日志以何种形式输出.综合使 ... 
- redis配置详解
		##redis配置详解 # Redis configuration file example. # # Note that in order to read the configuration fil ... 
- Log.properties配置详解
		一.Log4j简介 Log4j有三个主要的组件:Loggers(记录器),Appenders (输出源)和Layouts(布局).这里可简单理解为日志类别,日志要输出的地方和日志以何种形式输出.综合使 ... 
随机推荐
- 解决 插件LArea 在IOS上浮出软键盘问题
			移动端使用 省市县城市选择三级联动的时候, 插件LArea 会有一个问题 ios浏览器和ie9已下(包括ie9)浏览器都有input设置readonly之后input还有聚焦的问题. ios inpu ... 
- 移动端根元素(html)的设置
			1.通过js设置 <script> document.documentElement.style.fontSize = document.documentElement.clientWid ... 
- PAT Basic 1008
			1008 数组元素循环右移问题 (20 分) 一个数组A中存有N(>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将A中的数据由(A0A1⋯AN ... 
- Understanding Built-In User and Group Accounts in IIS 7
			Understanding Built-In User and Group Accounts in IIS 7 By lzb October 19, 2018 Introduction In earl ... 
- Docker卸载高版本重装低版本后启动提示:driver not supported
			解决方法: mv /var/lib/docker /var/lib/docker.old 其实就是docker镜像文件夹目录作怪,新版本的目录无法与旧版本目录相兼容. 不过建议降级的用户这样操作: y ... 
- 使用CSS里的user-select属性控制用户在页面上选中的内容
			CSS里的user-select属性用来禁止用户用鼠标在页面上选中文字.图片等,也就是,让页面内容不可选.也可以只允许用户选中文字,或者全部都放开,用户可以同时选中文字.还包括文本里的图片.视频等其它 ... 
- C# Winform使用Windows Media Player播放多媒体整理
			一.简单使用示例步骤 1.添加Windows Media Player 组件当前是系统的 Com组件 工具箱>右键“选择项”>选择Com组件 2.控件拖拽到桌面,使用 private vo ... 
- Tensorflow之Slim使用
			一些参考文档: 官方文档: TensorFlow-Slim image classification model library TensorFlow-Slim使用说明 TensorFlow-Slim ... 
- GPG(GnuPG)入门
			GPG(GnuPG)入门 下载: https://gnupg.org/download/index.html 或者 http://www.hellopp.cn/page/5b9a1405c3f1f7d ... 
- grid - 通过网格线名称设置网格项目位置
			使用网格线名称设置网格项目位置和使用网格线号码设置网格项目位置类似. 1.引用网格线名称的时候不应该带方括号 <view class="grid"> <view ... 
