window2008下iis7环境下,url中包含空格或加号的伪静态,将不能正常访问。
会出现请求筛选模块被配置为拒绝包含双重转义序列的请求。浏览器返回 HTTP 错误 404.11 – Not Found错误。
解决办法:
在站点根目录新建或编辑web.config 文件,找到<system.webServer>节点,添加<requestFiltering allowDoubleEscaping="true"> 。
代码效果如下:
<configuration> < system.webServer> < security> < requestFiltering allowDoubleEscaping="true"></requestFiltering> < /security> < /system.webServer> < /configuration>
经测试 需要用security包裹,另外如果<system.webServer>里有其它内容,请放到< system.webServer>里的第一行。