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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top