Create a user identity
User identity is represented by a class that implements IIdentity interface. .NET comes with a class GenericIdentity that is a simple implementation of IIdentity interface. Here, we will create a user identity using GenericIdentity class.
Code:
GenericIdentity gi=new GenericIdentity(User.Identity)
Here, we used the same identity object as created by forms authentication (User.Identity) but you can use your own ideality instead.
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!