有没有一种方法可以禁用.NET浏览器检测? [英] Is there a way to disable .NET browser detection?

查看:109
本文介绍了有没有一种方法可以禁用.NET浏览器检测?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到禁用asp.net 2.0添加的浏览器检测功能的方法。

我希望全部对我网页的请求被视为IE正在请求它们。

我的解决方法是将一个App_Browsers文件夹添加到我的项目中,并在其中包含以下.browser文件:

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?

谢谢

推荐答案

ASP.Net中最令人反感的部分之一,恕我直言。除了像这样的配置,别无选择法将其关闭。

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.

这篇关于有没有一种方法可以禁用.NET浏览器检测?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆