Home  »  Articles  »  ASP.Net  »

A potentially dangerous Request.Form value was detected from the client

 Posted By : Manoj SahooPosted Date : 19/07/2011 06:38:15 AM Category : ASP.Net Points : 3

Many times i got this error in my previous project. So, i search on google to solve this problem and i found one solution. If you have this error then you can check this


Potential Error

You can solve this problem with following ways :

  •  You can add <httpRuntime requestValidationMode=“2.0″ /> under <system.web> section of web.config file
  •  add  <pages validateRequest=”false”> in web.config file.

you can also add the <pages validateRequest=”false”> in page directive of each and every page.

With .Net 4 this doesnt seem to work alone. You need to put the ValidateRequest=”false” on Page directive. Also on your web.config put this
<system.web>
<httpRuntime requestValidationMode=”2.0″ />
</system.web>

Responses
 Author : Manoranjan Sahoo Member Level : BronzeDate : 19/07/2011 02:01:41 PM Points : 2

Nice explanation...

Thanks for posting this article...



Post Reply
Login to post Response.