The client detects potentially dangerous request. Form values. Reasons and Solutions
The client detects potentially dangerous request. Form values. Causes and Solutions
Cause: When a page request contains a string such as HTML or Javascript. ASP. NET considers it a dangerous value and throws a resignation exception. This exception occurs when the WYSIWYG editor (for example, the FCKeditor or freetextbox control) is used on the page.
Solution 1: Add <% PAGE validaterequest = "false" %> to the page.
Solution 2: Modify the <pages> label of the web. config configuration file. <Pages validaterequest = "false">... </pages>. This method removes all page verification functions, so this method is not recommended.
Solution 3: capture exceptions so that you can define the exception prompts by yourself.
Protected void page_error (Object sender, eventargs E)
{
Exception EX = server. getlasterror ();
If (httpcontext. Current. server. getlasterror () is httprequestvalidationexception)
{
Httpcontext. Current. response. Write ("Enter the exception information to be prompted ");
Httpcontext. Current. clearerror ();
}
}