Login/Logout Problem

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Login/Logout Problem

    Hi,

    I have a small problem...Please go through it and share your views on
    it.

    I am using an xml file to authenticate my users. Also for each user i am
    maintaining a attribute named "status" which holds the logged in information
    i.e. if the user has logged in then the staus will be "LoggedIn" else it
    will be "LoggedOut". Now this helps me to detect that the same user does
    not login twice. if he has already logged in then the status will be
    LoggedIn, so if he tries to login the 2nd time i tell him that he needs to
    logout.

    Now, the problem is that i change the status to "LoggedOut" only when he
    logsout using the LOGOUT button. But if he just closes the browser and ends
    the application without logging out through the LOGOUT button then i want to
    log him out explicitly when he closes the browser. I am not using
    sessions...but i have a hint that this may require the use of sessions.
    Can't i solve this problem without using Sessions. i.e. Is it possible that
    i get some message when the user ends the application by closing the
    browser, so using that message i can log him out explicitly.

    Please help...

    regards,
    Smita.


    smita Guest

  2. Similar Questions and Discussions

    1. Register/Login/Logout Tutorials?
      Does anyone know of any good, easy to understand tutorials on how to make register/login/logout pages in dreamweaver? i want to make it so...
    2. CGI.Query_String Login/Logout Problem
      Here is my form for logging in; <form name="login_form" method="post" action="#CGI.SCRIPT_NAME#?#CGI.QUERY_STRING#"> I use the CGI.SCRIPT_NAME and...
    3. Form Logout Problem
      Hi All, I have a menu with two frames such as the .net monster menu i was wondering how i can logout from the menu to the login page. I am using...
    4. Windows 2000 Server forcing logout immediately after login
      It would appear that the program used to disinfect the server was called "Hijackthis". The offending line that was removed was a registry entry...
    5. session problem - login screen continually reloads after pressing the login button
      I am trying to get sessions to work on a log in screen to give certain users access to certain pages/directories. The problem is that when the...
  3. #2

    Default RE: Login/Logout Problem

    You don't need to do anything explicit to "use" sessions - at least not in this context

    There's a Session_End() event that you can declare in global.asax
    This is called when a session times out or ends
    I expect you can still get hold of the context (and therefore the username) in this event

    This is just something to try - I am not sure it will solve your problem 100%.
    richlm Guest

  4. #3

    Default Re: Login/Logout Problem

    Hi

    use the authentication ticket.
    Keep the relevenat information in the ticket while doing authentication.

    But it will use httpCookie for storing the information.
    Extract the information from cookie in session_end event and do the
    necessary stuff.
    Hope this would solve the problem.

    Another soultion, you can store the CustomPrincipal in the HttpContex and
    retrive the users infor any time after the authentication.

    Thanks
    Madan

    "smita" <smita@rarefind.com> wrote in message
    news:O24K9VS9DHA.3012@TK2MSFTNGP09.phx.gbl...
    > Hi,
    >
    > I have a small problem...Please go through it and share your views on
    > it.
    >
    > I am using an xml file to authenticate my users. Also for each user i am
    > maintaining a attribute named "status" which holds the logged in
    information
    > i.e. if the user has logged in then the staus will be "LoggedIn" else it
    > will be "LoggedOut". Now this helps me to detect that the same user does
    > not login twice. if he has already logged in then the status will be
    > LoggedIn, so if he tries to login the 2nd time i tell him that he needs to
    > logout.
    >
    > Now, the problem is that i change the status to "LoggedOut" only when he
    > logsout using the LOGOUT button. But if he just closes the browser and
    ends
    > the application without logging out through the LOGOUT button then i want
    to
    > log him out explicitly when he closes the browser. I am not using
    > sessions...but i have a hint that this may require the use of sessions.
    > Can't i solve this problem without using Sessions. i.e. Is it possible
    that
    > i get some message when the user ends the application by closing the
    > browser, so using that message i can log him out explicitly.
    >
    > Please help...
    >
    > regards,
    > Smita.
    >
    >

    Madan Nayak Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139