Multiple Sessions on a Page

N

Nitin

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;
}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top