Users Pricing

forum

Home Forums Handling an 'A potentially dangerous Request.Form value was detected' exception without deactivating validation – MindStick

Handling an 'A potentially dangerous Request.Form value was detected' exception without deactivating validation

Anonymous User 3360 19 Dec 2014

I am creating an ASP.NET application using C# for the scripting language. When I enter HTML code into the textboxes on my webpage I get the following exception 'A potentially dangerous Request.Form value was detected', as expected. I would like to be able to catch this exception so that I can put an error message out to the user, but I can only find articles on how to disable the validation; this is not something I'd like to do. Does anybody know where in the ASP.NET page lifecycle this exception would have to be handled, as I am having trouble catching it.

 

Thanks you.


2 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md