Last post Dec 14, 2009 08:03 AM by meliweb
Dec 11, 2009 09:24 AM|meliweb|LINK
I've developped (with visual studio 2005) a web site in C# for mobile (it was with framework 2.0).
I've used "Web Form Mobile" pages.
When I browse the site with a navigator (like IE) it's working fine. With a Blackberry it's not.
I have very often this error :
"Exception Details: System.Exception: The page requires session state
that is no longer available. Either the session has expired, the client
did not send a valid session cookie, or the session state history size
is too small. Try increasing the history size or session expiry limit"
Finding out that the Blackberry not seems to be able to keep the identification cookie, I tried to use (in web.config) the mode "StateServer" instead of "inProc" with the proper service running. Now it doesn't loose the identification
cookie, but still shows errors 500 or 504 (same message as before) and a new problem : the page asked is not actualised ! You have to manually launch "Actualize" to refresh the page and see what you were supposed to see ! And if you don't the error shows immediatly...
I've read anything I could on the subject but I'm now really out of ideas...
Does any one have some experience developping in C# with session for a Blackberry ?
May be the server "BES" (which is used by the Blackberry) is the cause of our problem, but no answer yet...
I'm tried to post there
http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/19e724c9-f281-4409-9346-b91d145b84ee but the answer was to post here...
Dec 11, 2009 11:38 AM|SKT_01|LINK
this is a well known error of ASP.NET Mobile Web Forms which occurs with all devices, not only with BlackBerry Smartphones and you won't find a solution.
The best way to avoid this error is to use ASP.NET Web Forms instead of Mobile Controls.
Dec 14, 2009 04:24 AM|meliweb|LINK
Thanks for your answer, but I'm a bit surprised. Why would Microsoft add "Mobile Page" in their templates in Visual Studio if it's working better with usual .aspx pages ?
Except for the sessions variables, the application is working fine. I might send variables threw pages instead of sessions variables if really I can't to anything else. The login page with an autentification cookie is working fine, the variable is not lost
when using the mode "StateServer".
ASP.NET Mobile Controls
Dec 14, 2009 07:23 AM|SKT_01|LINK
Microsoft has marked the ASP.NET Mobile Controls/ASP.NET Mobile Web Forms as obsolete/deprecated by now. Cf.
.NET Framework 4.0 System.Web.UI.MobileControls
Visual Studio 2008 does no more contain mobile templates.
Dec 14, 2009 08:03 AM|meliweb|LINK
Thank you very much for those information.
I'm in contact with microsoft support France and they haven't told me that yet. As I can read from your link :
Obsolete. Contains classes that provide design-time support for the classes in the
System.Web.UI.MobileControls namespace. The classes in this namespace are obsolete; use the classes in
I hope this post will help others to avoid loosing their time...