The request verification process detects potentially dangerous client input values, and the processing of the request has been aborted. This value may indicate that the application is compromised.ProgramSecurity attempts, such as cross-site scripting attacks. To allow the page to override the application request verification settings, set the requestvalidationmode feature in the httpruntime configuration section to requestvalidationmode = "2.0 ". Example: />.After setting this valueYou can disable request verification by setting validaterequest = "false" in the page command or <pages> Configuration section. However, in this case, it is strongly recommended that the application explicitly check all input.
Method 1: Modify the Web. config file:
<Configuration>
<System. Web>
<Httpruntime requestvalidationmode = "2.0" type = "codeph" text = "/codeph"/> // Indispensable
<PagesValidaterequest = "false"/>
</System. Web>
</Configuration>
Method 2: Add the following on the. ASPX page:
<% @ PageValidaterequest = "false" %>
Pagessection. validaterequest attributes
Note: This attribute is added in. NET Framework 2.0.Gets or sets a value to determine whether ASP. Net checks the input from the browser for the dangerous value.
Namespace:System. Web. Configuration
Assembly:System. Web (in system. Web. dll)
Reference blog: http://apps.hi.baidu.com/share/detail/22666626