Click here to Skip to main content
15,915,319 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I need to check session time out in website. The following code detecting the timeout when i'm put these code undert the file Global.asax.vb in the Subroutine

Sub Application_PreRequestHandlerExecute()
If Session.IsNewSession = True Then
Dim strCookieHEader As String = Request.Headers("Cookie")
If Not strCookieHEader Is Nothing AndAlso strCookieHEader.IndexOf("ASP.NET_SessionId") >= 0 Then

'Redirect to Index page if Session Time Out
Response.Redirect("Index.aspx", True)
End If
End If
End Sub


But the page is not redirecting to specified page. Whats the problem in the code. Is there any idea to use Some other Subroutine or Server.Transfer?
Posted

There are different approaches to this;

See this page for various methods, using both pageload/post back checks or client side timers.

http://geekswithblogs.net/shahed/archive/2007/09/05/115173.aspx[^]
 
Share this answer
 
Hey just checkout following link...will help u

Try This

regards
koolprasad2003 :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900