Как установить текущий пользователь httpcontext.current.user asp.net -mvc
String[] newRoles = { "Administrator", "Customer" };
GenericIdentity newIdentity = new GenericIdentity(model.AccountName);
GenericPrincipal newPrincipal = new GenericPrincipal(newIdentity, newRoles);
System.Web.HttpContext.Current.User = newPrincipal;
Joyous Jackal