Logout when Session Expires

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • agarwalsunitadhn
    replied
    Originally posted by kunal pawar
    Oh, then u need to maintain USer session in cookies or in hidden variable. that will help u to know which user's session expired
    Thanks i had done that by storing the value in hidden field.

    Thanks once again

    Leave a comment:


  • kunal pawar
    replied
    Oh, then u need to maintain USer session in cookies or in hidden variable. that will help u to know which user's session expired

    Leave a comment:


  • agarwalsunitadhn
    replied
    Originally posted by kunal pawar
    Before use session checked that exists or not if not then redirect ur page to Login page

    if Session["userName"] == null then response.redire ct('');

    I have to record the logout time also. bt this code will not work it only to redirect to another page. becoze when the session expires then how i got the value that which user is logged in n how we record their time of logout in database

    Leave a comment:


  • kunal pawar
    replied
    Before use session checked that exists or not if not then redirect ur page to Login page

    if Session["userName"] == null then response.redire ct('');

    Leave a comment:


  • agarwalsunitadhn
    started a topic Logout when Session Expires

    Logout when Session Expires

    my problem is that after every 20minutes i got the error that the
    Object reference not set to an instance of an object.
    and highlight the line
    lblWelcome.Text = "Welcome, " + Session["userName"].ToString();

    I want that when the session expires either user will see LogIn page or the sesion resume their values.
    Where i write the code for the above.... thanks for your code in advance
Working...