Redirecting in the mobile framework

A

amn3sia

I'm using custom authentication and when redirecting I was handling it like
any other non-mobile web app I've done before. I was using
Response.Redirect(). Now I've noticed that there is a
MobilePage.RedirectToMobilePage() method. Should I be using this instead of
Response.Redirect()?

I was receiving the following error in my app:
"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."

Stack trace: at
System.Web.UI.MobileControls.MobilePage.OnViewStateExpire(EventArgs e)
at
System.Web.UI.MobileControls.MobilePage.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


I'm checking the Session state in the OnInit event so they should be
redirected before this point. Also I read in the documentation for
Response.Redirect() that in cookieless forms using the ~/ for the application
root can cause new Sessions to be created which I was also doing. Do you
think either or both of these could be the cause of my problem?
 

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