Hi,
I am setting valdiateRequest = false in Web.Config as well as on the @Page Directive.
But it does not work for .Net 4.5 and .Net 4.0 Frameworks but works if I downgrade to .Net 3.5
Please help
To make the ValidateRequest work for .Net 4.0 or higher frameworks you will need to add the followings setting in the web.config <system.web> section
<httpRuntime requestValidationMode="2.0"/>
Once you add it then you can set validateRequest = false in web.config or in the @Page Directive. It will work!.
For more details refer ASP.Net Error: A potentially dangerous Request.Form value was detected from the client
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.