Prevent double login

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

  1. #1

    Default Prevent double login

    Hello,

    I created web application protected by Forms Authentication.

    I'll describe it in short:
    User logs in, variable Application("LastAccessTime" & UserId) is written to
    Application State then is retrieved aspx page with client-side script which
    pools web service every x seconds (protected by the same security) and
    displays retrieved xml data using dhtml.
    With every web service request Application("LastAccessTime" & UserId) is
    changed to current time.
    If there is no request for 30 seconds user is considered logged out, web
    service won't respond with data and user can (must) login again with the
    same username.
    Variable "UserId" is stored in Session object.
    Anybody who would try to login again with same username would be rejected
    since Application("LastAccessTime" & UserId) has current time meaning the
    user is active.
    After timeout period of 30 seconds username is again available.

    I created this solution but it is not robust enough since variables stored
    in Session and Application are frequently lost on ISP's web server.

    Is there any better and more stable solution?
    Wagner Guest

  2. Similar Questions and Discussions

    1. Strange problem with Forms authentication: After successfull login, login page is still displayed
      Hi there I have a quite strange problem with my ASP.NET-Application. The application has being deployed one year ago and worked fine till last...
    2. How to prevent double click
      Hi, I built a sliding panel which will slide up when clicked and slide down when clicked again. However, I found out if the user double clicks...
    3. 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...
    4. how to prevent prevent .so-calling routine to crash from segfaults in .so
      Hi, Guys I am stuck with a problem and need some help. Platform : Linux(RedHat 7.3) Problem Area : Dynamic Shared Object Libraries, POSIX...
    5. LOGIN: ERROR- Failed to initialize policy manager. (IFOR_PM_FATAL) Login sessions denied.
      Verify that you haven't set the system date by mistake to a far away future. All the licenses then become expired! Restoring the system to the...
  3. #2

    Default Re: Prevent double login

    You would get a more stable solution by storing the UserID plus
    LastAccessTime in a database table (or possibly in a DataSet persisted to a
    file). This of course would induce an extra overhead for updating the
    db/dataset once per request, but still, it would probably be more stable
    since data would not get erased by the ISP restarting the webservice on the
    server.

    By the way, why don't you set Session.Timeout at first logon in stead of
    maintaining your time-slot manually in the Application object?

    Sincerely
    Svein Terje Gaup

    "Wagner" <wagner@email.t-com.hr> wrote in message
    news:1739nlc550nzh$.1s502j9979xyd.dlg@40tude.net.. .
    > Hello,
    >
    > I created web application protected by Forms Authentication.
    >
    > I'll describe it in short:
    > User logs in, variable Application("LastAccessTime" & UserId) is written
    > to
    > Application State then is retrieved aspx page with client-side script
    > which
    > pools web service every x seconds (protected by the same security) and
    > displays retrieved xml data using dhtml.
    > With every web service request Application("LastAccessTime" & UserId) is
    > changed to current time.
    > If there is no request for 30 seconds user is considered logged out, web
    > service won't respond with data and user can (must) login again with the
    > same username.
    > Variable "UserId" is stored in Session object.
    > Anybody who would try to login again with same username would be rejected
    > since Application("LastAccessTime" & UserId) has current time meaning the
    > user is active.
    > After timeout period of 30 seconds username is again available.
    >
    > I created this solution but it is not robust enough since variables stored
    > in Session and Application are frequently lost on ISP's web server.
    >
    > Is there any better and more stable solution?

    Svein Terje Gaup 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