Reputation: 179
Actually i'm working on a web-app in Asp.NET 5 and I'm looking for a solution that only Anonymous can have access to the LOGIN and REGISTER page.
If you have ideas ..
Upvotes: 0
Views: 522
Reputation: 722
Use this Code To Know the user is authenticated or not:
if (User.Identity.IsAuthenticated)
{
Response.Redirect("/Home");
}
Upvotes: 1