Request validation problem only for Googlebot
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.Pa开发者_C百科th 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.
This is resolved by
http://geekswithblogs.net/renso/archive/2011/08/26/a-potentially-dangerous-request-value-was-detected-from-the-client.aspx
精彩评论