By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,600 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,600 IT Pros & Developers. It's quick & easy.

how to redirect to loginpage after session timeout

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.