Hp 触摸板浏览器 ASP.NET 认为 cookie 已禁用
刚买了一个便宜的废弃的惠普触摸板。我注意到,当我浏览到我的 ASP.NET Web 应用程序时,URL 返回会话 ID。触摸板启用了 cookie,并且我的 web.config 中没有提及“cookieless”,我本以为它会默认为“false”。 IOW 这不应该发生。我在这个特定的网络应用程序上使用过的任何其他浏览器中都没有看到这种行为。
是否还有其他原因导致会话 id 嵌入到该浏览器的 url 中?
编辑
好的,我刚刚注意到,虽然浏览器启用了 cookie(并且访问“浏览器功能”在线站点支持这一点),但 ASP.NET 的 HttpBrowserCapability.Cookies 设置为 false。
Just bought a cheap defunct hp touchpad. I notice that when I browse to my asp.net web app the url returns session id. The touchpad has cookies enabled and my web.config contains no mention of 'cookieless' which I would have thought would default to "false". IOW This should not be happening. And I have not seen this behavior with any other Browsers I have used on this particular web app.
Is there some other reason that would result in the session id being embedded in the url for this browser?
Edit
Ok i just noticed that, although cookies are enabled for the browser (and visits to 'Browser capability' online sites back this up), ASP.NET's HttpBrowserCapabilities.Cookies is set to false.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来默认的 ASP.NET 浏览器功能检测不处理 WebOS 浏览器。
微软实际上已经放弃更新浏览器功能,但您可以从无线通用资源文件(WURFL)项目中获得类似的功能:
http://wurfl.sourceforge.net/dotNet/ (提供示例代码)
目前官方推荐使用此数据的方法是通过名为 51Degrees.mobi http://51 Degrees.codeplex.com/
我说官方推荐如下:
http://www .asp.net/learn/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application
这是处理一般移动设备的最完整的参考之一,并且是以下内容的一部分:
http://www.asp.net/mobile
检查它以获取更多文档。
还有其他选择,例如:
http://blog.mobileesp.com/?page_id=53
它为您提供了一般类型的设备。您将检查 WebOSTablet 而不是 cookie 支持,因此,它在设备特定优化方面比一般功能检测更有帮助。
但您可能想尝试使用 WURFL 项目 API 或 51Degree.mobi API 进行检测。
Sounds like the default ASP.NET browser capabilities detection doesn't handle WebOS browser.
Microsoft has given up updating the browser capabilities actually, but you can have similar functionality from Wireless Universal Resource File (WURFL) project:
http://wurfl.sourceforge.net/dotNet/ (powered with sample code)
The current officially recommended way to make use of this data is through a library called 51Degrees.mobi http://51degrees.codeplex.com/
I say officially recommended as per:
http://www.asp.net/learn/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application
which is one of the most complete references for dealing with mobile devices in general, and is part of:
http://www.asp.net/mobile
Check it for more documentation.
There are other alternatives as well like:
http://blog.mobileesp.com/?page_id=53
which gives you general classes of devices. You'd be checking for WebOSTablet instead of cookies support, so, it's helpful more in device specific optimizations than for general capabilities detection.
But you probably want to try the WURFL project API or the 51Degree.mobi API for the detection.