There are lots of questions on this topic but I didn't find one for our special case ...
We have a productive site running and once in a while - about 5 to 10 times a day - we receive error notifications about potentially dangerous Request.Path values. The strange thing here is, that the actual "dangerous" characters are not in the request path but in the parameters.
When looking into the request object we get values like these:
HttpContext.Current.Request.Url.AbsolutePath --> /relative/path/to/page
HttpContext.Current.Request.Url.Query --> ?param1=value¶m2=value
ASP.NET is complaining about the ?
in the params:
Message: A potentially dangerous Request.Path value was detected from the client (?). (System.Web.HttpException)
Stacktrace:
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
But from my point of view everything seems to be fine (these are indeed valid urls and if I type them in the browser they do work).
We're also tracking the client IP and client user agent and they are mostly related to some crawlers. Is it possible, that they're building a erroneous request which triggers these errors?