NickCraver/StackExchange.Exceptional

System.Web.HttpException Logged, but missing data

seankearney opened this issue · 1 comments

Requests such as /test<illegal.jpg throw a System.Web.HttpException exception

[HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (*).]
   System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9939972
   System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53

Exceptional does catch these exceptions, but it is lacking information such as the actual Url. We can trace this down to https://github.com/NickCraver/StackExchange.Exceptional/blob/master/src/StackExchange.Exceptional/AspNetExtensions.cs#L145 where in this case the context.Handler == null.

image

The context.Handle == null check (proposed to remove in #148) causes other null refs on startup...but I'll have to find what those were.

We need a bit more info here to more finitely localize the null checks and get as much info as possible instead of bailing completely. I'll try and look back, but not sure I have the exact cause that 2fad0bc resolved.