Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. session state issues

session state issues

Scheduled Pinned Locked Moved ASP.NET
databasehelpcsharpasp-netsysadmin
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nerzhul86
    wrote on last edited by
    #1

    im developing an online test application using ASP.NET , IIS 7.0 is the server and SQL 2005 is our database engine. the user for a test must login first. i used session id s and variables to store names and login logout. but im having a problem with authentication .if on one computer im logged in as raj , then from a different computer i can still login as raj. how can i maintain unique logging in of users.really stumped. please help.

    R 1 Reply Last reply
    0
    • N nerzhul86

      im developing an online test application using ASP.NET , IIS 7.0 is the server and SQL 2005 is our database engine. the user for a test must login first. i used session id s and variables to store names and login logout. but im having a problem with authentication .if on one computer im logged in as raj , then from a different computer i can still login as raj. how can i maintain unique logging in of users.really stumped. please help.

      R Offline
      R Offline
      Rajeesh MP
      wrote on last edited by
      #2

      u can maintan with database flag... but u should keep in mind..all the users will not click logout...they will close browser directly

      modified on Wednesday, March 11, 2009 8:18 AM

      C N 2 Replies Last reply
      0
      • R Rajeesh MP

        u can maintan with database flag... but u should keep in mind..all the users will not click logout...they will close browser directly

        modified on Wednesday, March 11, 2009 8:18 AM

        C Offline
        C Offline
        Cybernate
        wrote on last edited by
        #3

        The solution given by Rajesh is appropriate. You can further enhance is as follows to automagically maintain/reset the flags: 1)Define a database level job to scan the users table for the active flags and the time they were marked and then reset the same after a specific amount of time. 2) Or add code to Session_OnEnd to mark the flag 3) or use and asynchronous javascript call on the page_unload event at client side to reset the flag.

        Regards, Cybernate

        1 Reply Last reply
        0
        • R Rajeesh MP

          u can maintan with database flag... but u should keep in mind..all the users will not click logout...they will close browser directly

          modified on Wednesday, March 11, 2009 8:18 AM

          N Offline
          N Offline
          nerzhul86
          wrote on last edited by
          #4

          ur saying that i should create a flag field in my database , and everytime a user logs in set flag to 1, and then on logging out set flag to 0.right? is there any easier way?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups