Multiple Sessions on a Page

Discussion in 'ASP .Net Security' started by Nitin, Dec 24, 2003.

  1. Nitin

    Nitin Guest

    Hi,
    I am having a web site using windows authentication
    (basic). After the verification of credentials, a session
    is started. Within the Session_Start Event, I am
    extracting the identity of current user. But it starts a
    new session sometimes after executing one line in the
    session_start event and sometimes more lines.

    Following is the code :

    Can anyone suggest me why it is starting multiple
    sessions here.


    protected void Session_Start(Object sender, EventArgs e)
    {
    string userLoggingIn = Users.GetUserLoggingIn();
    int userNameLen = userLoggingIn.Length -
    userLoggingIn.IndexOf(@"\",0,userLoggingIn.Length)-1;
    userLoggingIn = userLoggingIn.Substring
    (userLoggingIn.IndexOf(@"\",0,userLoggingIn.Length)
    +1,userNameLen);
    Session["parent"]= userLoggingIn;
    }
     
    Nitin, Dec 24, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shankar Reddy
    Replies:
    0
    Views:
    495
    Shankar Reddy
    Aug 23, 2004
  2. Shankar Reddy
    Replies:
    4
    Views:
    560
    Shankar Reddy
    Sep 2, 2004
  3. Ken Cox [Microsoft MVP]

    Re: Relationship between IIS Sessions and ASP.NET Sessions?

    Ken Cox [Microsoft MVP], Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,529
    Luther Miller
    Aug 8, 2003
  4. scottymo
    Replies:
    3
    Views:
    923
    Dominick Baier
    Sep 30, 2006
  5. Bookham Measures

    Moving from ASP Sessions to Database Sessions

    Bookham Measures, Jul 23, 2007, in forum: ASP General
    Replies:
    19
    Views:
    676
    Bookham Measures
    Aug 23, 2007
Loading...

Share This Page