Quantcast
Channel: ASPSnippets RSS Feed
Viewing all articles
Browse latest Browse all 4751

ASP.Net MVC: Redirect to Login Page if User is not Authenticated (logged in)

$
0
0
Here Mudassar Ahmed Khan has explained with an example, how to implement a simple login form using Forms Authentication which validates user login from database and also redirects user to Login page if the user is not Authenticated (logged in) and tries to access a page that requires authentication in ASP.Net MVC Razor. The Login page URL will be set in the authentication section of the Web.Config file and the User will be redirected back to Login page if not logged in using the Authorize Data Annotation attribute in ASP.Net MVC Razor.

Viewing all articles
Browse latest Browse all 4751

Trending Articles