开发者

QueryString.AllKeys Lowercase?

I开发者_运维知识库'm having some strange behaviour under ASP.NET MVC3. On certain requests, I'm seeing my AllKeys collection of the QueryString having all the keys in lowercase!

The code in question is similar to the following:-

helper.ViewContext.RequestContext.HttpContext.Request.QueryString.AllKeys

Where "helper" is a System.Web.Mvc.HtmlHelper of type T of my ViewModel. This behaviour appears to be sporadic, but is causing issues as some of the downstream code in my system is expecting a case-dependant QueryString.

To try and diagnose the issue, I threw together a quick HttpModule and can confirm that on the BeginRequest event, the QueryString is NOT lowercased. So, I think something is happening within the MVC pipeline, possibly...?

Any ideas?

Thanks, Mark

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜