Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

When i login to my application from one users credential, it gets logined to the application with another user's credential and shows Welcome Another user's name.This issue is occuring on production server whereas in development server the code works fine.

The issue occurs in different machine say user A is loggon onmachine A and User B is loggon on Machine B.The User A, when loggined see Welcome user B.

I tried to look into the issue, most the places I am using session and abandoning the session on logout's click,whereas I have not used cache object and the application logic seems to be fine.

We have used ADO.NET entity framework 4.0 with WCF service.

Can anybody suggest the possibilities why this issue is occuring.



Thanks.
Posted

1 solution

It's impossible to say without more detail for sure, but my guess is that you are storing the 'currently logged in user' in a static or global scope (i.e. as a static property or an entry in a static dictionary), instead of in the session. You need to store the current user in the session (i.e. in Session["some string"]).

If you are using Membership with a custom membership provider, make sure that you aren't doing anything in the provider in a static scope, either.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900