views:

64

answers:

1

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?

A: 

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.

Mike Ohlsen
Thank you, I'll certainly check that. But the issue doesn't exist if I turn javascript off on the device, so it's likely another issue.
sgwill
right. Seems like the BB browser is just very hoakey with cookies.
Mike Ohlsen
We tried throwing SSL on the site and it didn't work (SCARY! The BB Proxy messing with SSL!). Once we pared it down to 1 cookie the site worked fine.
sgwill