Create a principal based on user identity and list of roles
We will now create a principal based on the identity and role information that we have. .NET provides a class called GenericPrincipal that represents a simple implementation of IPrincipal.
Code:
GenericPrincipal gp=new GenericPrincipal(gi,roles);
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!