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

27. February 2013

This error comes when you try to get user input in raw html through a textbox control in order to resolve this you will have to include ValidateRequest="false"

in

<%@ Page Title="" ValidateRequest="false" Language="C#" MasterPageFile="" AutoEventWireup="true" CodeBehind="" Inherits="" %>

and also you will have to include this

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

in your web.config file

ASP.NET

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading