ASP.NET Webforms 上的 Blackberry 正在丢失 SessionID
我们在使用现有的 ASP.NET Webforms 应用程序时遇到了问题。这是一个已经成功运行多年的应用程序;我们正在添加移动部分,但启用了 Javascript 的 Blackberry 给我们带来了麻烦。
我们打开了 SessionState,并将 SessionID 存储在 Cookie 中。 Blackberry 设备(使用 5.0 和 4.6 进行测试)要么根本不存储该值,要么删除该值,因为每次回发都会创建一个新会话,而不是加载前一个会话。
当黑莓设备上禁用 javascript 时,应用程序可以正常工作,但我们不能要求用户关闭 javascript。
如果我们使用 CookieLess 会话,该应用程序可以正常工作,但这样做会以我们尚未准备好的方式影响现有网站。
有什么方法可以确保启用 JavaScript 的 Blackberry 设备将 sessionId 正确存储在 cookie 中?我们是否应该考虑将值存储在隐藏字段中?
We're having trouble with an existing ASP.NET Webforms app. It's an app that has been running successfully for years; we're adding a Mobile section and Blackberry with Javascript enabled is giving us trouble.
We have SessionState turned on, with the SessionID stored in a Cookie. The Blackberry device (tested with both 5.0 and 4.6) is either NOT storing the value at all, or removing the value, because every postback creates a new session instead of loading the previous session.
The app works correctly when javascript is disabled on the blackberry device, but we can't ask users to turn off javascript.
The app works correctly if we use CookieLess session, but doing so would affect the existing site in ways we're not quite prepared to do.
Is there any way to ensure a javascript-enabled Blackberry device correctly stores the sessionId in a cookie? Should we look into storing the value in a hidden field instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从一些快速搜索来看,听起来 BB 设备在解析 cookie 和处理多个 cookie 方面遇到了困难。也许它只发回一个 cookie,而带有会话信息的 cookie 则不会发回。
还可以尝试对 cookie 数据进行 URL 编码,也许另一个字符导致 BB 浏览器错误地解析 cookie,从而遗漏了会话 ID。
此链接 似乎有帮助并且像类似的问题。
From a few quick searches, it sounds like BB devices have trouble parsing cookies and handling multiple cookies. Perhaps it is only sending back one cookie, and the one with the session info is not sent back.
Also try URL encoding the cookie data, perhaps another character is causing the cookie to be parsed incorrectly by the BB Browser, thus leaving off the session ID.
This link seems helpful and like a similar problem.