.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

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

Posted By: parthiban     Posted Date: June 28, 2014    Points:5   Category :ASP.Net
A potentially dangerous Request.Form value was detected from the client (ContentPlaceHolder2_FreeTextBox1="<div><b>Hi,</b></div...").

i get this error when i insert html formatted data to databse on server in spite of adding <pages validateRequest ="false" /> in config file...

working on framework 2.0 but i get

Source File: c:\4833248\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\30e2fac9\c8e43583\App_Web_thveb1ei.6.cs Line: 0

it works locally fine but on server i encounter this issue...

how to resolve it..

Author: ASPEvil             
Posted Date: June 28, 2014     Points: 20   


You need to add validateRequest="false" in either the @Page directive at the top of the ASP.Net page(on which particular page this issue is being generated) or in the "web.config" file(if you want to avoid this particular issue with all of your other pages too, for the same web application).

Please Note: If you're using .net 4, you need to drop back to the validation mode from 2.0, by altering web.config slightly and adding the following:

<httpRuntime requestValidationMode="2.0" />

Hope this will help.


Author: nasreenbasu             
Posted Date: December 23, 2017     Points: 20   

thanks for great information !!!
[URL="http://www.sailpointonlinetraining.com"]sailpoint online training[/URL]

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend