views:

84

answers:

0

I have a finished web app that store user db in flat file, not MSSQL. Now I want to implement impersonate feature for admins. I said finished because it will be a lot of work to change the login mechanism so it is really not an option.

I don't want to be logged out as admin, I just want to temporarily impersonate any users, mainly to be used for troubleshooting. There will be a list of users and admins can select any, and admin will be logged in as that user in a new window. If possible, I'd like to implement the scenario where admin will not lose his session when impersonating. ie. Admin is still admin on initial window, and admin is impersonated user in the newly opened window.

It's hard to find related information because most searches return Windows authentication impersonation. The closest SO topic I found is this, but it's not helping.

Exactly what class should I be looking at? Is it even possible for my case? Is implementing membership roles feasible? How?

On a related note, go here if you want to talk about alternatives to troubleshoot without resorting to impersonation.

Edit: My question is pretty similar to this one, except I don't have RoleManager, or at least I don't know how to make a custom one.