what I learn is what u c Detecting Session timeout and redirection

leave a comment »

If you are using Basepage logic its better to use this code there.

Redirection logic is written for pages with Frames or without Frames

Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs) MyBase.OnPreRender(e)
If context.Session.IsNewSession = True Then
Dim strCookieHeader As String = Page.Request.Headers("Cookie")
If Not strCookieHeader Is Nothing Then
strCookieHeader = strCookieHeader.ToLower
End If

'Checking for duplicate Session.
If Not strCookieHeader Is Nothing AndAlso strCookieHeader.IndexOf("asp.net_sessionid") >= 0 Then
If Page.Request.IsAuthenticated = True Then
End If

'If you want to redirect to defaultpage you can use this

'If you are using Frames then this will work.
End If
End If
End Sub


Written by gchandra

August 28, 2007 at 10:12 am

Posted in Asp.Net

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: