When two users access the system at the same time , somehow it confuses users , not only the name , but its permissions too ...
I'm assigning the session after login in ActionFilter
public class UserAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
int idUser = new UserBusiness().GetIdByExternalId(decodedToken.ExternalUserId.ToInt32());//Id from goes token
User user = new UserBusiness().GetById(idUser);
filterContext.HttpContext.Session["User"] = user;
}
}
And in BaseController have the following method to retrieve the session:
public User GetCurrentUser()
{
return (User)HttpContext.Session["User"];
}
Has anyone had this problem with session?