Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client

Home    ASP .NET    Error    Http Request Validation Exception

       


ASP .NET Error : System.Web.HttpRequestValidationException: A potentially dangerous Request.
Form value was detected from the client 

ASP .NET Prevents scripting tags from beging 

ASP.NET's built in validator by default prevents people from entering html to make sure 
people do not enter html format tags. Because a hacker could potentially use these tags 
for scripting attack. Its a good thing to have a validator but at times you need to remove 
the safety feature.

This is how i fix it.

I modifed the page header 

<%@ Page Language="vb"  ValidateRequest="false" EnableEventValidation="false"
 AutoEventWireup="false" CodeBehind="Edit.aspx.vb" Inherits="WCMS.Edit" %>

only thing i modifed was to add in the page header
validateRequest="false"

you could also make it take effect in the entire site by adding the below tags to 
web.config

<configuration>
<system.web>
<pages validaterequest="false"></pages>
</system.web>
</configuration>
</pre></content>




  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam