A potentially dangerous Request.Form value was detected from the client
使用者在頁面上提交表單到伺服器時,伺服器會檢測到一些潛在的輸入風險,例如使用富文字編輯器控制元件(RichTextBox、FreeTextBox、CuteEditor等)編輯的內容中包含有HTML標記或指令碼標記,ASP.NET頁面會丟擲一個"A potentially dangerous Request.Form value was deceted from the client"的異常。這個是ASP.NET頁面為了防範頁面注入功能的一種保護機制,要取消這種保護,常規的做法是在.aspx檔案的<%@Page %>部分加入ValidateRequest="false"屬性。但是從.NET 4.0開始你可能需要多修改一個地方,在網站的web.config檔案中加入這行配置:
<system.web> <compilation debug="true" targetFramework="4.0"/> <httpRuntime requestValidationMode="2.0"/> </system.web>
同時,你還需要確保頁面上使用者輸入的部分不會存在任何注入攻擊的程式碼,常用的做法是使用Encode處理。
相關文章
- SQL*Net message from clientSQLclient
- SQL*Net more data from clientSQLclient
- Script to generate AWR report from remote sql clientREMSQLclient
- sql net message from|to client與sql execution countSQLclient
- Oracle的SQL*Net more data from client 等待事件分析OracleSQLclient事件
- select hang住等待SQL*Net message from ClientSQLclient
- Connecting to ASM through the TNS Listener from a Client DesktopASMclient
- mysql:Variable 'character_set_client' can't be set to the value of 'NULL'解決MySqlclientNull
- SQL*Net message from client 事件產生的原因分析SQLclient事件
- MySQL主從同步報Client requested master to start replication from positionMySql主從同步clientAST
- Variable 'character_set_client' can't be set to the value of Null的解決方法clientNull
- [20161208]SQL*Net message from clientSQLclient
- 0824SQL/Net message from client 丟包模擬SQLclient
- To get TaskID's Integer ID value from the GUID in SharePoint workflowGUI
- [mysql] 批量匯入提示: Variable ‘character_set_client’ can’t be set to the value of ‘NULLMySqlclientNull
- MySQL 5.7複製報錯Client requested master to start replication from impossibleMySqlclientAST
- ORA - 12502 TNS:listener received no CONNECT_DATA from clientclient
- 1149 Dangerous Goods Packaging (25分)Go
- JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from StringJSONErrorJavaLDA
- Connect SQL Server from Linux Client using Windows Authentication and troubleshoot stepsSQLServerLinuxclientWindows
- [20190622]收集SQLNet Message From Client資訊.txtSQLclient
- Unknown initial character set index ‘255‘ received from server. Initial client character set can beIndexServerclient
- Error: Attribute application@label value=(@string/appname) from AndroidManifestErrorAPPAndroid
- [20180918]等待事件SQL/Net more data from client.txt事件SQLclient
- [20180925]等待事件SQLNet more data from client 6.txt事件SQLclient
- The request was rejected because the URL contained a potentially malicious String "%2e"AI
- IPC Send timeout detected
- [20180922]等待事件SQLNet more data from client 4.txt事件SQLclient
- [20180920]等待事件SQLNet more data from client 3.txt事件SQLclient
- [20180926]等待事件SQLNet more data from client 7.txt事件SQLclient
- Excel匯入資料異常Cannot get a text value from a numeric cell解決辦法Excel
- NBU detected IBM drives as unusableIBM
- GLOBAL ENQUEUE SERVICES DEADLOCK DETECTEDENQ
- Oracle Executable Binary Mismatch DetectedOracle
- PAT (Advanced Level) Practice 1149 Dangerous Goods Packaging (25分)Go
- 排查 “Detected Tx Unit Hang”問題
- Global Enqueue Services Deadlock detected.ENQ
- LOW_VALUE、HIGH_VALUE、ENDPOINT_VALUE轉換--UTL_RAW、DBMS_STATS.CONVERT_RAW_VALUE