1

I have user logged in (admin) and would like him to be able to switch to any other user (to do their tasks on their behalf). Ideally keep track of original identity, so that admin can switch back to being admin without need to log out and log in.

ga5tan
  • 11
  • 2
  • Look into impersonation. Related question: https://stackoverflow.com/questions/25681473/how-do-i-add-impersonation-in-mvc-asp-net-identity-2-0 – John H Aug 10 '18 at 20:40
  • 1
    Possible duplicate of [How do I use ASP.NET Identity 2.0 to allow a user to impersonate another user?](https://stackoverflow.com/questions/24161782/how-do-i-use-asp-net-identity-2-0-to-allow-a-user-to-impersonate-another-user) – trailmax Aug 10 '18 at 22:32

1 Answers1

0

This helped me to solve the problem: https://www.codeproject.com/Articles/43724/ASP-NET-Forms-authentication-user-impersonation

It was referenced in How do I use ASP.NET Identity 2.0 to allow a user to impersonate another user? and I simply used source code of dll in my solution to get desired effect

ga5tan
  • 11
  • 2