How to disconnect a user at the end of a given process in ASP.NET Identity C#

Asked

Viewed 21 times

0

Good morning guys, I’m developing a solution where in a certain process of buying in e-commerce the system will automatically login using the data of a default user. The whole process will be hidden... the system will do it alone. But when finishing the process or closing the page I need the system to automatically depress. I tested several forms in Identity, but I still can’t find a solution. Below are some tests I did.

TempData["UserIdentity"] = User.Identity.GetUserId();

HttpContext.GetOwinContext().Authentication.SignOut();
HttpContext.LogoffUsuario();
  
System.Web.HttpContext.Current.Session.RemoveAll();
System.Web.Security.FormsAuthentication.SignOut();
            
Session.Abandon();
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.