Problems with Session variable

G

Guest

Hello:

I just wrote my first ASP.Net application, tested it on my development
environment and deployed it on a production server. That's when I encountered
a problem.

In my Global.ASCX, I have coded the Session_Start event
1. I read Request.ServerVariables("Auth_User")
2. Save it as a variable, userid, in the session variable.

Here is the problem:

1. User A signs in and the screen shows that the userid is "User A".
2. User B signs in through another workstation and his user ID shows "User
A" when in fact it should show "User B".

Can somebody tell me what I am doing wrong?

I thought the session is private to the user?

Venki
 
S

S.M. Altaf [MVP]

Simple: Don't do it from Global.asax. I can't see your code, but it seems like you are doing something that would allow for the conflict to occur. Shouldn't you be doing this elsewhere, like, upon login?

Also, out of pure speculation, I suspect that setting a session variable in the session_start event is uhm... loopy.

-Altaf





--------------------------------------------------------------------------------

All that glitters has a high refractive index.
www.mendhak.com
Hello:

I just wrote my first ASP.Net application, tested it on my development
environment and deployed it on a production server. That's when I encountered
a problem.

In my Global.ASCX, I have coded the Session_Start event
1. I read Request.ServerVariables("Auth_User")
2. Save it as a variable, userid, in the session variable.

Here is the problem:

1. User A signs in and the screen shows that the userid is "User A".
2. User B signs in through another workstation and his user ID shows "User
A" when in fact it should show "User B".

Can somebody tell me what I am doing wrong?

I thought the session is private to the user?

Venki
 

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

Top