If someone only enters something like this:
http://www.mydomain.exe/&This will generate an IIS error such as:
A potentially dangerous Request.Path value was detected from the client (&).
The strack trace gives:
[HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (&).]
System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +11481611
System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +184
I am tring to intercept that so it will not end up in the Event Viewer. So, this will make less things to check for in the Event Viewer and would avoid writing entries for nothing.
Basically, if that situation occurs, I would like to take control over it.
I try putting something in:
Sub Application_PreRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
But, this does not even reach that yet. IIS blocks it right away. What can I do to handle the situation?