a potentially dangerous request.form value was detected from the client

well, this is because your Page ValidationRequest is “True”, by default. you need to modify this in your web.config or on the page directive. You may have to set this like ValidationRequest=”False”

or in web.config under <system.web>

<Pages validateRequest=”false”/>

If you’re using .Net 3.5 or .Net 4.0 you will have to modify web.config with the following or add requestValidationMode=”2.0″ in httphandlers section.

<httpRuntime requestValidationMode=”2.0″ />

Hope this will help you to solve the issue.. please feel free to comment if you have any issues…

Advertisements

2 thoughts on “a potentially dangerous request.form value was detected from the client

  1. I am working on web application in .net 3.5 but it cant add
    in web.config file coz in .nwt 3.5 there is no tab found in web.config file

    then how can i solve this?

    • Sorry for the delay, was busy with some projects…

      Please try adding those in web.config ,

      • Step 1: Insert the httpRuntime element with the attribute requestValidationMode=”2.0″
      • Step 2: Add the validateRequest=”false” attribute in the pages element.

      Example:

      <configuration>
      <system.web>
      <httpRuntime requestValidationMode="2.0" />
      </system.web>
      <pages validateRequest="false">
      </pages>
      </configuration>

      if you still facing some issue please comment,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s