I have a custom membership/roles provider, due to the nature of the project it will require admins to login as users while assisting them with queries.
Now, Its easy to re-log the admin in with the selected membership account, however this means that the admin will effectively be logged out. I'm looking for a way to allow admins to impersonate users yet very easily switch back to there own account at any time.
Any suggestions?
This should be the sort of thing you want.
You can call the ImpersonateValidUser method with the username and password of the domain account you want. And then reverse it on the logout.
You should be able to bend this to work with your custom membership provider.