How to force user to re-login after my session variable expires in ASP.Net?

ASPNet_Developer
ASPNet_Developer used Ask the Experts™
on
I am user FORMS AUTHENTICATION in my web application.
<system.web>
  <authentication mode="Forms">
    <forms loginUrl="Login.aspx"
           timeout="3000"
           protection="none"
           cookieless="false" />
  </authentication>
</system.web>


I have a session variable sessionID. When my session variable expires of is set to less than zero. I would like to force the user to re-login again. Right now even when after I set  timeout="3000". I still able to user some of the webpages. What did I miss? Can any please suggest what I should do.
Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
look here:
Asp.net: Implementing Auto-Logout functionality
http://stackoverflow.com/questions/709182/asp-net-implementing-auto-logout-functionality

Commented:
You need to check if the session variable is not nothing on page load.

if isnothing(SessionID) Then
  Response.Redirect("~/Login/Login.aspx")
end if
Most Valuable Expert 2012
Top Expert 2014
Commented:
You do realize that timeout is in minutes?
Top Expert 2011

Commented:
3000 minutes?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial