Intersting Session

Results 1 to 3 of 3

Thread: Intersting Session

  1. #1
    hmmm Guest

    Default Intersting Session

    our website has different type of logins(admin,user etc).<BR>we are using session object to store UserId.we have a security.asp page which does something like this<BR><BR>if session("UserId") = "" then<BR>response.redirect("login.asp")<BR>end if <BR><BR>Now,my problem is:it is allowing 2 users to login at the same time if you open 2 windows of IE.can 2 values of Session("UserId") coexist?.i want make it like this.if a user has logged in,even if another window is opened,and someone tries to login,it should take him right in instead of allowing him to log in as a different user.<BR><BR>thanks in advance<BR>

  2. #2
    Join Date
    Dec 1969

    Default Multiple windows == same session...

    ...unless you can somehow force MSIE to *always* create a new "engine" when the user creates a new browser window. And while the *user* can specify that as an option in MSIE, you as the programmer can NOT do so.<BR><BR>From ASP, you can&#039;t even *detect* that the user has multiple windows open in same MSIE process. There *may* be a way to do this with client-side scripting. Never tried it, but it would seem you could try to find all windows open and set a flag saying "I am the master window for this particular connection." Of course, as soon as the user navigates to a page off your site, that info goes away, so you&#039;d have to continually refresh it.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Client Script and Cookies Might Help

    Try using cookies. They get saved to the user&#039;s Temporary Internet folder on the local hard-drive. You should be able to write a client-side script that reads the cookie adn keeps the user in line.

Posting Permissions

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