1. 程式人生 > >Asp.net相關知識和經驗的碎片化記錄

Asp.net相關知識和經驗的碎片化記錄

class xquery 配置 lte 方案 字符 慎用 code run

1、解決IIS7.0下HTTP 錯誤 404.15 - Not Found 請求篩選模塊被配置為拒絕包含的查詢字符串過長的請求”問題

方案1:在程序的web.config中system.web節點裏面插入

<httpRuntime maxRequestLength="999999999" maxQueryStringLength="2097151" />

代碼。再次運行,失敗

方案2:對IIS 中的applicationHost.config 配置文件進行配置(慎用)。再次運行,失敗

方案3:在程序的web.config中configuration節點裏面插入

<system.webServer
> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483647" maxQueryString="2147483647"/> </requestFiltering> </security> </system.webServer>

代碼。再次運行,失敗

最終解決辦法:方案1 + 方案3 的結合體,再次嘗試,運行通過。

Asp.net相關知識和經驗的碎片化記錄