A potentially dangerous Request.Form value was detected from the client
Posted on 2009-04-03
I know we will have this error if we input dangerous value like <script>.
and I know we can turn it off by using validaterequest in web.config or put it at each page.
"Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"
How do we handle this? is it possible to make the error more friendly? maybe redirect it to other site? or if possible displaying an ajax message..
unwrap it from <asp:updatepanel also make an ugly error: "A potentially dangerous Request.Form value was detected from the client"
and I don't want to set the validaterequest to false either :).
Please kindly advise for better solution.