问题
I failed to find a way to disable the browser detection feature added by asp.net 2.0.
I want all the request to my page to be treated as if IE is requesting them.
My fix was to add an App_Browsers folder to my project and in it have the following .browser file:
<browsers>
<browser refID="Default">
<capabilities>
<capability name="preferredRenderingMime" value="text/html" />
<capability name="preferredRenderingType" value="html32" />
<capability name="requiresFullyQualifiedRedirectUrl" value="false" />
</capabilities>
</browser>
</browsers>
Is there a way to turn this feature off altogether?
Thanks
回答1:
One of the more offensive parts of ASP.Net, imho. No way to just turn it off AFAIK, other than config like this.
You may be interested in Rob Eberhardt's pool of resources on the topic.
回答2:
You can override the browser detection by setting the ClientTarget property on the page to the choice you would like it to make (probably uplevel in your case)...
来源:https://stackoverflow.com/questions/435989/is-there-a-way-to-disable-net-browser-detection