On my ASP.NET MVC 3 website, I noticed a random "potentially dangerous Request.Path value was found on the client (%)". unhandled exception in the Windows application log.
Although they can be absolutely correct with regular use of the site (for example, / random web bots), the number of requests seems to refer to the actual local users of the Internet provider.
In the details of the exception request, the request URL is different from the request path:
Request URL: http://www.somesite.com/Images/Image C Space.jpg
Request path: / Images / Imagehttp: //www.somesite.com/Images/Image C Space.jpg View: //www.somesite.com/Images/Image C Space.jpgSpace.jpg
Please note that in the "request path" any place where there is a "space" in the path is replaced with an exact copy of the url request!
Inside the site, the actual link is as follows:
<img src="/Images/Image%20With%20Space.jpg" />
Any idea what could be causing this? I tried to look at the documentation for Request.Path and Request.Url, but I can not understand why they will be different. Pressing the request URL directly returns the resource.
Update. I managed to get a trace of one of the problems using the IIS 7.0 Failed Request Tracing function:
Referer: Google Search
User-Agent: Mozilla / 5.0 (iPad, OS 5_1_1, like Mac OS X) AppleWebKit / 534.46 (KHTML, for example, Gecko) Version /5.1 Mobile / 9B206 Safari / 7534.48.3
RequestURL: http://www.somesite.com:80/Images/Image%20With%20Space.jpg
URL iOS 5.1.1 . Google . .
, :
MODULE_SET_RESPONSE_ERROR_STATUS . ModuleName = "RequestFilteringModule", Notification = "BEGIN_REQUEST", HttpStatus = "404", HttpReason = "Not Found", HttpSubStatus = "11",
IIS, 404.11 " " URL-. , url, http://www.somesite.com/Images/Image%2520With%2520Space.jpg , .
ββASP.NET 4.0.
, , , . - , AppleWebKit. , Safari?