Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Mobile > Session Expired

Reply
Thread Tools

Session Expired

 
 
Kenny
Guest
Posts: n/a
 
      10-23-2003
Hi,

Is there anyone know how to detect and redirect the page when hit the error
message as below:-

Thanks,
Kenny

Server Error in '/MobileMM' Application.
----------------------------------------------------------------------------
----

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.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

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.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[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.OnViewStat eExpire(EventArgs e) +45
System.Web.UI.MobileControls.MobilePage.LoadPageSt ateFromPersistenceMedium()
+315
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +423

----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573


 
Reply With Quote
 
 
 
 
steph
Guest
Posts: n/a
 
      10-23-2003
In vb:

Protected Overrides Sub OnViewStateExpire(ByVal e As
EventArgs)
'viewstate has expired
Me.RedirectToMobilePage("errorEvent.aspx?ref=views tate")
End Sub


>-----Original Message-----
>Hi,
>
>Is there anyone know how to detect and redirect the page

when hit the error
>message as below:-
>
>Thanks,
>Kenny
>
>Server Error in '/MobileMM' Application.
>----------------------------------------------------------

------------------
>----
>
>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.
>
>Description: An unhandled exception occurred during the

execution of the
>current web request. Please review the stack trace for

more information
>about the error and where it originated in the code.
>
>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.
>
>Source Error:
>
>An unhandled exception was generated during the execution

of the current web
>request. Information regarding the origin and location of

the exception can
>be identified using the exception stack trace below.
>
>Stack Trace:
>
>[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.OnViewSta teExpire

(EventArgs e) +45
>System.Web.UI.MobileControls.MobilePage.LoadPageS tateFromP

ersistenceMedium()
>+315
>System.Web.UI.Page.LoadPageViewState() +18
>System.Web.UI.Page.ProcessRequestMain() +423
>
>----------------------------------------------------------

------------------
>----
>Version Information: Microsoft .NET Framework

Version:1.1.4322.573; ASP.NET
>Version:1.1.4322.573
>
>
>.
>

 
Reply With Quote
 
 
 
 
steph
Guest
Posts: n/a
 
      10-23-2003
In vb:

Protected Overrides Sub OnViewStateExpire(ByVal e As
EventArgs)
'viewstate has expired
Me.RedirectToMobilePage("errorEvent.aspx?ref=views tate")
End Sub


>-----Original Message-----
>Hi,
>
>Is there anyone know how to detect and redirect the page

when hit the error
>message as below:-
>
>Thanks,
>Kenny
>
>Server Error in '/MobileMM' Application.
>----------------------------------------------------------

------------------
>----
>
>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.
>
>Description: An unhandled exception occurred during the

execution of the
>current web request. Please review the stack trace for

more information
>about the error and where it originated in the code.
>
>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.
>
>Source Error:
>
>An unhandled exception was generated during the execution

of the current web
>request. Information regarding the origin and location of

the exception can
>be identified using the exception stack trace below.
>
>Stack Trace:
>
>[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.OnViewSta teExpire

(EventArgs e) +45
>System.Web.UI.MobileControls.MobilePage.LoadPageS tateFromP

ersistenceMedium()
>+315
>System.Web.UI.Page.LoadPageViewState() +18
>System.Web.UI.Page.ProcessRequestMain() +423
>
>----------------------------------------------------------

------------------
>----
>Version Information: Microsoft .NET Framework

Version:1.1.4322.573; ASP.NET
>Version:1.1.4322.573
>
>
>.
>

 
Reply With Quote
 
steph
Guest
Posts: n/a
 
      10-23-2003
In vb:

Protected Overrides Sub OnViewStateExpire(ByVal e As
EventArgs)
'viewstate has expired
Me.RedirectToMobilePage("errorEvent.aspx?ref=views tate")
End Sub


>-----Original Message-----
>Hi,
>
>Is there anyone know how to detect and redirect the page

when hit the error
>message as below:-
>
>Thanks,
>Kenny
>
>Server Error in '/MobileMM' Application.
>----------------------------------------------------------

------------------
>----
>
>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.
>
>Description: An unhandled exception occurred during the

execution of the
>current web request. Please review the stack trace for

more information
>about the error and where it originated in the code.
>
>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.
>
>Source Error:
>
>An unhandled exception was generated during the execution

of the current web
>request. Information regarding the origin and location of

the exception can
>be identified using the exception stack trace below.
>
>Stack Trace:
>
>[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.OnViewSta teExpire

(EventArgs e) +45
>System.Web.UI.MobileControls.MobilePage.LoadPageS tateFromP

ersistenceMedium()
>+315
>System.Web.UI.Page.LoadPageViewState() +18
>System.Web.UI.Page.ProcessRequestMain() +423
>
>----------------------------------------------------------

------------------
>----
>Version Information: Microsoft .NET Framework

Version:1.1.4322.573; ASP.NET
>Version:1.1.4322.573
>
>
>.
>

 
Reply With Quote
 
Kenny
Guest
Posts: n/a
 
      10-29-2003
Hi Steph,

Now I am able to redirect the main page to the login page when session
expired with OnViewStateExpire. What if a user click the login button after
few minits and hit the session timeout again?

I just wonder why the new session is not created only when the user click
the login button?

I though by adding this


"steph" <(E-Mail Removed)> wrote in message
news:090d01c39957$0db6bcb0$(E-Mail Removed)...
> In vb:
>
> Protected Overrides Sub OnViewStateExpire(ByVal e As
> EventArgs)
> 'viewstate has expired
> Me.RedirectToMobilePage("errorEvent.aspx?ref=views tate")
> End Sub
>
>
> >-----Original Message-----
> >Hi,
> >
> >Is there anyone know how to detect and redirect the page

> when hit the error
> >message as below:-
> >
> >Thanks,
> >Kenny
> >
> >Server Error in '/MobileMM' Application.
> >----------------------------------------------------------

> ------------------
> >----
> >
> >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.
> >
> >Description: An unhandled exception occurred during the

> execution of the
> >current web request. Please review the stack trace for

> more information
> >about the error and where it originated in the code.
> >
> >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.
> >
> >Source Error:
> >
> >An unhandled exception was generated during the execution

> of the current web
> >request. Information regarding the origin and location of

> the exception can
> >be identified using the exception stack trace below.
> >
> >Stack Trace:
> >
> >[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.OnViewSta teExpire

> (EventArgs e) +45
> >System.Web.UI.MobileControls.MobilePage.LoadPageS tateFromP

> ersistenceMedium()
> >+315
> >System.Web.UI.Page.LoadPageViewState() +18
> >System.Web.UI.Page.ProcessRequestMain() +423
> >
> >----------------------------------------------------------

> ------------------
> >----
> >Version Information: Microsoft .NET Framework

> Version:1.1.4322.573; ASP.NET
> >Version:1.1.4322.573
> >
> >
> >.
> >



 
Reply With Quote
 
Kenny
Guest
Posts: n/a
 
      10-29-2003
Hi Steph,

Now I am able to redirect the main page to the login page when session
expired with OnViewStateExpire. What to do if a user click the login button
(*after 1 min) and hit the session timeout again?

I just wonder why the new session is not created only when the user click
the login button? and How?

I though by adding Session.Abondon can solve the problem but it seems like
when I click the Login button (* after 1 min), the program still calling the
OnViewStateExpire and give me timeout message.

Protected Overrides Sub OnViewStateExpire(ByVal e As EventArgs)
Session.Abondon()
RedirectToMobilePage("MobileLogin.aspx?err=timeout ")
End Sub

Currently I set the SessionTimeout to 1 for testing purpose.

tx,
Kenny


"steph" <(E-Mail Removed)> wrote in message
news:090d01c39957$0db6bcb0$(E-Mail Removed)...
> In vb:
>
> Protected Overrides Sub OnViewStateExpire(ByVal e As
> EventArgs)
> 'viewstate has expired
> Me.RedirectToMobilePage("errorEvent.aspx?ref=views tate")
> End Sub
>
>
> >-----Original Message-----
> >Hi,
> >
> >Is there anyone know how to detect and redirect the page

> when hit the error
> >message as below:-
> >
> >Thanks,
> >Kenny
> >
> >Server Error in '/MobileMM' Application.
> >----------------------------------------------------------

> ------------------
> >----
> >
> >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.
> >
> >Description: An unhandled exception occurred during the

> execution of the
> >current web request. Please review the stack trace for

> more information
> >about the error and where it originated in the code.
> >
> >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.
> >
> >Source Error:
> >
> >An unhandled exception was generated during the execution

> of the current web
> >request. Information regarding the origin and location of

> the exception can
> >be identified using the exception stack trace below.
> >
> >Stack Trace:
> >
> >[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.OnViewSta teExpire

> (EventArgs e) +45
> >System.Web.UI.MobileControls.MobilePage.LoadPageS tateFromP

> ersistenceMedium()
> >+315
> >System.Web.UI.Page.LoadPageViewState() +18
> >System.Web.UI.Page.ProcessRequestMain() +423
> >
> >----------------------------------------------------------

> ------------------
> >----
> >Version Information: Microsoft .NET Framework

> Version:1.1.4322.573; ASP.NET
> >Version:1.1.4322.573
> >
> >
> >.
> >



 
Reply With Quote
 
Cheryl
Guest
Posts: n/a
 
      10-29-2003
To catch a page error you can always use this:

Private Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Error
' Add some code here to log error if desired
Server.Transfer("CustomErrorPage.aspx")
End Sub

This will handle any errors in your page and redirect to an error
page. Before redirecting you could log the errors somewhere if you
want to see what it is but that way the user gets a nice friendly
page.







"Kenny" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Hi Steph,
>
> Now I am able to redirect the main page to the login page when session
> expired with OnViewStateExpire. What to do if a user click the login button
> (*after 1 min) and hit the session timeout again?
>
> I just wonder why the new session is not created only when the user click
> the login button? and How?
>
> I though by adding Session.Abondon can solve the problem but it seems like
> when I click the Login button (* after 1 min), the program still calling the
> OnViewStateExpire and give me timeout message.
>
> Protected Overrides Sub OnViewStateExpire(ByVal e As EventArgs)
> Session.Abondon()
> RedirectToMobilePage("MobileLogin.aspx?err=timeout ")
> End Sub
>
> Currently I set the SessionTimeout to 1 for testing purpose.
>
> tx,
> Kenny
>
>
> "steph" <(E-Mail Removed)> wrote in message
> news:090d01c39957$0db6bcb0$(E-Mail Removed)...
> > In vb:
> >
> > Protected Overrides Sub OnViewStateExpire(ByVal e As
> > EventArgs)
> > 'viewstate has expired
> > Me.RedirectToMobilePage("errorEvent.aspx?ref=views tate")
> > End Sub
> >
> >
> > >-----Original Message-----
> > >Hi,
> > >
> > >Is there anyone know how to detect and redirect the page

> when hit the error
> > >message as below:-
> > >
> > >Thanks,
> > >Kenny
> > >
> > >Server Error in '/MobileMM' Application.
> > >----------------------------------------------------------

> ------------------
> > >----
> > >
> > >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.
> > >
> > >Description: An unhandled exception occurred during the

> execution of the
> > >current web request. Please review the stack trace for

> more information
> > >about the error and where it originated in the code.
> > >
> > >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.
> > >
> > >Source Error:
> > >
> > >An unhandled exception was generated during the execution

> of the current web
> > >request. Information regarding the origin and location of

> the exception can
> > >be identified using the exception stack trace below.
> > >
> > >Stack Trace:
> > >
> > >[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.OnViewSta teExpire

> (EventArgs e) +45
> > >System.Web.UI.MobileControls.MobilePage.LoadPageS tateFromP

> ersistenceMedium()
> > >+315
> > >System.Web.UI.Page.LoadPageViewState() +18
> > >System.Web.UI.Page.ProcessRequestMain() +423
> > >
> > >----------------------------------------------------------

> ------------------
> > >----
> > >Version Information: Microsoft .NET Framework

> Version:1.1.4322.573; ASP.NET
> > >Version:1.1.4322.573
> > >
> > >
> > >.
> > >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CGI::Session How can a session be not expired and at the same time empty? djbonnici@gmail.com Perl Misc 0 06-14-2007 07:56 PM
creating a new session when a session is expired alexjaquet@gmail.com Perl Misc 2 05-17-2006 07:52 PM
Session Expired be4 timeout Plz Help me urgently net4matrimonials@gmail.com ASP .Net 0 12-07-2005 05:35 AM
Session Expired error Lenny ASP .Net 1 07-31-2003 04:33 PM
Session Expired (sessionState mode="SQLServer") TSelvan ASP .Net 1 07-30-2003 05:13 AM



Advertisments