2

I get this error after changing from .Net 4.5 to 4

the error says: "A potentially dangerous Request.Form value was detected from the client"

In my 4.5 solution i have "ValidateRequest="false"" in the top of my aspx page. But that doesn't seem to work anymore.

I know why the error appears, but not how to make it disappear.

Surfbutler
  • 1,529
  • 2
  • 17
  • 38
Michael Tot Korsgaard
  • 3,892
  • 11
  • 53
  • 89

1 Answers1

5

You can add this to your config file

<system.web>
    <compilation debug="true" targetFramework="4.0" />
    <httpRuntime requestValidationMode="2.0" />
</system.web>

Link : http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.requestvalidationmode%28VS.100%29.aspx

Aghilas Yakoub
  • 28,516
  • 5
  • 46
  • 51