Wednesday, May 18, 2011

potentially dangerous request.form value was detected from the client

Some times when we try to post a data  to asp.net forms in the form of some script or xml Asp.net blocks that request do not forward it
if we are developing our own project or its a .aspx page then we can simply avoid it by using ValidateRequest=false in page directive
but if had not developed anything and are just deploying that on our server
so for that we can use ValidateRequest =false in our web.config file also
like
'<'pages validateRequest="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/'>'
but some times this also do not work for ur
because validationmode property is not  set to correct values especially in the case when we have multiple dot net frameworks running appliations on IIS
so we can use  validation mode to avoid this error
like


'<' httpRuntime requestValidationMode="2.0"/  '>'
under the System.web node.




No comments:

Post a Comment