window2008下iis7環境下,url中包含空格或加號的僞靜態,將不能正常訪問。web
會出現請求篩選模塊被配置爲拒絕包含雙重轉義序列的請求。瀏覽器返回 HTTP 錯誤 404.11 – Not Found錯誤。api
在站點根目錄新建或編輯web.config 文件,找到<system.webServer>節點,添加<requestFiltering allowDoubleEscaping="true"> 。
代碼效果以下:
瀏覽器
<configuration> < system.webServer> < security> < requestFiltering allowDoubleEscaping="true"></requestFiltering> < /security> < /system.webServer> < /configuration>
經測試 須要用security包裹,另外若是<system.webServer>裏有其它內容,請放到< system.webServer>裏的第一行。測試