session state that is no longer available

R

rwoo_98

I read a number of the posts, but was not able to solve my problem. I
have a number of MobilePages. Basically each pages consists of a
Lists. The users selects a item, a postback occurs and the user is
redirected to another page, using --
RedirectToMobilePage("Page_m.aspx", false);

It works fine until the user clicks on the back button. The previous
page displays correctly, but the postback nolonger works. When you
select an item, you get the error

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.]
System.Web.UI.MobileControls.MobilePage.OnViewStateExpire(EventArgs
e) +45

System.Web.UI.MobileControls.MobilePage.LoadPageStateFromPersistenceMedium()
+313
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447

Web.Config

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

<!-- GLOBALIZATION
This section sets the globalization settings of the
application.
-->
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>
<mobileControls
cookielessDataDictionaryType="System.Web.Mobile.CookielessData" />


This happens on IE and Firefox. This does not happen on AudioVox PIE.


Thanks,

Roger
 
R

rwoo_98

Also, found something else peculiar. If I click on a link in the list,
and then click on another link on the same page before the page is
redirected, I get the dreaded error.

Can anyone from Microsoft provided any insight.

Thanks,
 
R

rwoo_98

I figured out the problem. In mobile controls, the viewstate is tied
to the session. My mobile form pages inherited from a base page reads
session variables into class variables and on prerender the session is
cleared and the class variables are read back into the session. This
mechanism was established to strategically use session variables and
prevent session variables from being created willy nilly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top