开发者

Why is browser detection on server side inconsistent?

I have a ASP.net web app deployed on IIS. When I access it using IE8 locally, the browser is correctly detected as IE8 through the request.browser

If I access the same web app with IE8 but this time remotely from another machine, the request.browser reports the browser to be IE7 ?!

I have been spinning my wheels with this, do you know why this is happening or how to correct it?

Edit: No, compability mode is not turned on o开发者_如何学运维n any of the instances. I double checked.

Here are the strings reported to the server in the two scenarios:

Accessed Remotely:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

Accessed Locally:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)


Yea it turns out it WAS the Compatibility mode (Thanks Šime Vidas).

Except I didn't explicitly turn it on, and IE didn't make that obvious to me.

By default after installing a fresh copy of IE8, it has the option Display intranet sites in Compatibility View ON. And because I was testing within my network, this option was taking effect. sneaky...

In Tools --> Compatibility view Settings, un-check 'Display intranet sites in Compatibility View'

Why is browser detection on server side inconsistent?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜