I don't have a lot of hair, but I'm pulling out what little of it is left.
My MVC3 app serves images via Action like so
/Image/ShowImage/25-000252?t=a&o=1
a is predefined image size, o is image order for that item
Image is controller, ShowImage is action which returns FilePathResult. All this works without any problems except when Googlebot comes along. Then all of a sudden request validation kicks in
A potentially dangerous Request.Path value was detected from the client (?).
How and why are both beyond my ability to understand.
ShowImage action has ValidateInput(False), web.config has httpRuntime requestValidationMode="2.0" but nothing seems to help.
Turn on tracing for the app or install elmah or look in the logs for iis to see the path that is returning 500 status code. Then it should be clear what needs to change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With