I have found some similar questions but none gave me what I really need.
Here is the thing, I have added this to my web.config
to handle user session expiration:
<sessionState mode="InProc" timeout="1" />
After 1 minute, the Session_End
event from Global.asax
is raised:
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Response.Redirect("Login.aspx")
End Sub
This doesn't work, because:
Response is not available in this context.
(By the way, this question got an anwswer telling that this is ok and it got upvotes).
I don't want nothing fancy. I just want a simple way to redirect the user to the login page when the session time expires. That's all.
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…