Am having error on this line of code of my authentication,
if (user. Identity.Isauthenticated)
{
var username = membership. GetUser (User. Identity.Name).ProviderUserKey;
}
Bit if I comment on the code below it will be working very fine.:
var username = membership. GetUser (User. Identity.Name).ProviderUserKey;
What what's the solution?
if (user. Identity.Isauthenticated)
{
var username = membership. GetUser (User. Identity.Name).ProviderUserKey;
}
Bit if I comment on the code below it will be working very fine.:
var username = membership. GetUser (User. Identity.Name).ProviderUserKey;
What what's the solution?