In this post I will explain how to solve the problem “A potentially dangerous Request.Form value was detected from the client in ASP.NET WebForms” using asp.net.
Description:
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> </div> </form> </body> </html> |
Server Error in ‘/RichTextboxSample’ Application. A potentially dangerous Request.Form value was detected from the client (remarks =”<html></html>”) Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (remarks="<html></html>5678,<c…"). Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ValidateRequest="false" %> |
<system.web> ……………………… <pages validateRequest="false"> </pages> ……………………… </system.web> |
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
Subscribe by RSS
Subscribe by Email
17 comments :
Great.It Worked me Suresh, thank you very much
it worked for me as well...thanks !
thx..
great.....thank you bhaii......
still getting error even after adding
hi
i am put this also but cant working
hello suresh,after puting validaterequest="False" i am still getting these error...pls do something...
A potentially dangerous Request.Form value was detected from the client (MainContent_FreeTextBox1="abc").
let it be...I correct it...by puting this also....your code was really helpful bro....thanx...
hhhh
really its working... Thank you sir... keep it up...
You help me solve the 'bad request' problem!
tu,
i still cannot get rid of the potential dangerous error. sir, can u please help me out
Thanks! :) It worked for me.
I am storing the contents of RichBox in table with datatype nvarchar(MAX),still it is storing only partial data from rich tb..Any idea what to do
hi it's working for me thank u.
I try it, but I can not find the bad Request.