Used by the online editor to detect request. Form values that are potentially dangerous

Source: Internet
Author: User

 

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.