为什么默认的控制适配器映射在 Chrome 或 Safari 上不起作用?
我已确认我的控制适配器未在 Chrome 和 Safari 中触发。我已经调试过了,适配器内的断点在 Chrome/Safari 中不会被命中,而当它们在 Firefox/IE 中完美工作时。因此,对于 Chrome/Safari,IIS 只是忽略映射。
我的 AdapterMappings.browser 文件如下所示:
<browsers>
<browser refID="Default">
<controlAdapters>
[...adapters here....]
</controlAdapters>
</browser>
</browsers>
这应该为所有浏览器提供映射,对吗?
我使用 Charles 代理来检查正在发送的用户代理。他们是:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7
知道为什么会这样吗?我读过的所有内容都告诉我我的浏览器映射是正确的?而且,正如我所说,这适用于 IE/Firefox,所以我知道我的配置在技术上是正确的。
I have confirmed that my Control Adapters are not triggering in Chrome and Safari. I've debugged, and the breakpoints inside the adapters just don't get hit in Chrome/Safari, when they work perfectly find in Firefox/IE. So, for Chrome/Safari, IIS is just ignoring the mapping.
My AdapterMappings.browser file looks like this:
<browsers>
<browser refID="Default">
<controlAdapters>
[...adapters here....]
</controlAdapters>
</browser>
</browsers>
This should provide mappings for all browsers, correct?
I used the Charles proxy to check what user agents were being sent. They are:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7
Any idea why this would be? Everything I've read tells me that my browser mappings are correct? And, as I said this works for IE/Firefox, so I know my configuration is technically correct.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们发现了问题。这是专门禁用 Chrome/Safari 中适配器的错误代码。他们工作正常,正常。
We found the problem. It was errant code that specifically disabling the adapters in Chrome/Safari. They work fine, normally.