Tuesday, January 24, 2012

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


When we are entering  script tag(ex: <html>,<script>) values in the text box
A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder1$txtRemarks="").
Solution: need to set  “requestValidationMode=2.0” which is exist under “httpRuntime”  under   <system.web> root node

Example:
           <system.web>

 <pages validateRequest="false">

    </pages>

//if your using .NET 4.0 set the following attribute
                <httpRuntime requestValidationMode="2.0"/>
            </system.web>

No comments:

Post a Comment