473,326 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

how to redirect to loginpage after session timeout

in my web.config i have the following :

<sessionState

mode="InProc"

stateConnectionString="tcpip=127.0.0.1:42424"

sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"

cookieless="false"

timeout="120"

/>

After 120 minutes of inactivity, the session times out and i lose my
session data. This is what I want, but I want that the user get redirected
to the logon page if it happens that he is hitting the server again once his
session is already timed out. Is there any mechanism allowing this in
theASP.NET framework? Or is it something I have to do "manually"?

Thanks in adcance and best regards,

Francois


Nov 18 '05 #1
2 5451
Hi Francois
If you are using forms authentication then you can use
<forms loginUrl="login.aspx" ...../> which redirects to the login page when the session is timed out.
Otherwise you can redirect the user to the login page in the Session_End event in the global.asax
Hope that helps :
srini
Nov 18 '05 #2
Hello
I am using Forms Authentication. but the page is not redirect to desired
login page after session is expired.
When I debug the application. Session_end is called. in the Session_End
method i write code to redirect to the LoginPage but it is still not
redirecting. it runs the redirecting code but physically not redirect.

What should I do more.?

Regards
Ather Ali
----- Original Message -----
From: "francois" <fr******@bettinghouses.com_NOSPAM>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Sent: Tuesday, May 25, 2004 09:05
Subject: how to redirect to loginpage after session timeout

in my web.config i have the following :

<sessionState

mode="InProc"

stateConnectionString="tcpip=127.0.0.1:42424"

sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"

cookieless="false"

timeout="120"

/>

After 120 minutes of inactivity, the session times out and i lose my
session data. This is what I want, but I want that the user get redirected
to the logon page if it happens that he is hitting the server again once his session is already timed out. Is there any mechanism allowing this in
theASP.NET framework? Or is it something I have to do "manually"?

Thanks in adcance and best regards,

Francois

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Grant | last post by:
Hi, I have searched the net and still no luck... I just want to automatically have a page redirected to another page when the timeout set in the config file expires. I currently have: ...
0
by: Ed Henn | last post by:
I'm having a problem with .NET Forms Authentication in a particular application. It's not redirecting properly when my session is timed out, seemingly only when I POST the page (i.e. click a form...
6
by: Weave | last post by:
I would like to redirect to a logout page after a session has timed out. I have placed a response.redirect "loggedoff.asp" in the Session_OnEnd subroutine in the global.asa, but it does not move...
1
by: Ather Ali Shaikh | last post by:
Hello I am using Forms Authentication. but the page is not redirect to desired login page after session is expired. When I debug the application. Session_end is called. In the Session_End method...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
1
by: Anders Jacobsen | last post by:
Hey Im devloping an application in asp.net 1.1 SP2. I need to control timeout values for each user. Im having trouble to make it work. When the session timouts out I want to redirect the user to...
1
by: Clare Strickson | last post by:
Hi Is it possible to redirect the user to a login page when the session has timed out? thanks in advance David Strickson
3
by: ABC | last post by:
How to automatic redirect if session timeout using ASP.NET 1.1?
0
by: Hrvoje Vrbanc | last post by:
Hello all, I have recently encountered a very strange problem: on every redirect from a codebehind page, sessions break. A varible is correctly stored in a session on a page and then, when a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.