I’m currently implementing a website that require a “customer support” user to Login as the customer itself for support purposes. The problem is that login with the customer user, interrupts the customer support login, so only a single user can be concurrently logged in from a single computer.
I use MVC3 with AspNetSqlMembershipProvider for authorization\authentication purposes.
How can I easly use multiple concurrent logins on a single computer?
You should abstract this at a higher level than the authenticated user. I suggest that you introduce the concept of a logged in user and a current user. The session remains with the logged in user, but logged in users with sufficient privileges have the ability to impersonate other users, with that user becoming the current user. Use the current user to control access to data, drive the UI (with exceptions for what an impersonating user would need to control impersonation), perform transactions, etc. Store the current user in the session as data, perhaps setting commonly used properties on a base controller in OnActionExecuting as needed.
Base Controller: