Answers for "how to set the current user httpcontext.current.user asp.net -mvc"

C#
0

how to set the current user 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;
Posted by: Guest on October-08-2020

Code answers related to "how to set the current user httpcontext.current.user asp.net -mvc"

C# Answers by Framework

Browse Popular Code Answers by Language