Thursday, March 22, 2012

Serious Exception

Hi,

I have a web application build in version .Net 1.1 & its successfully deployed to the server & running also.

But through my exception management library; I get following exception regularly in my inbox:

APPLICATION ERROR:

Error Details:System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (_ctl0:txtQuantity="...s too:
Time of Error:10/19/2006 8:13:47 PM

Please suggest me so that I can resolve this exception. If am not wrong this occurs 'coz of ViewState Curroption. But I dont have any idea to resolve it.

Thank you

i assumetxtQuantity is a textbox.

you can get away with that error by setting validateRequest attribute of the Page directive to false:

<%@. Page validateRequest="false" %>

check this for more details..

http://www.asp.net/faq/RequestValidation.aspx


HI,

Thanks for your grt reply.

I have already added Compare validator which accepts values greaterthanequal 1 even though I am getting this error. I am not getting know what will be the possible reason for this error.

Thank you


ASP.NET has a built-in function that checks whatever is input into a form for possible injection attacks (HTML, SQL, JavaScript, etc.) If anything looks funny, it will throw this exception.

While@. Page validateRequest="false" will work, you lose the built-in protection on the whole page. Not a good security practice.

It would be better in this case is to use Validation controls to prevent the page from even posting unless valid data is entered. For example, set it up so that txtQuantity only allows digits.


What value did you input in the TextBox when you get this error?

Thanks


Hello,

The textbox has one default value as 1. And this error comes when any user using the site. I dont know about what value does he enter.............

Thanks

0 comments:

Post a Comment