session_end and re-login

B

Burak Kadirbeyoglu

Dear ASP.NET Programmers,

I am using forms authentication in my web application. I would like the
users to be transferred to the login page when the session expires. I am
using session state, but the following code in global.asax file does not
work:

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
FormsAuthentication.SignOut()
Response.Redirect("login.aspx")
End Sub

How can I solve this problem or work around it?

Buran
 
T

Tu-Thach

If your pages/directories are marked with <allow>/<deny>
in the Web.config file, then when the session expires,
the user will be redirected to the login page
automatically when they access the page.

Tu-Thach
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top