• How to add Form/Window Authentication and Custom Error in ASP.NET?

    by  • October 27, 2015 • Microsoft .NET Framework, Microsoft ASP.NET, Microsoft ASP.NET MVC • 0 Comments

    Introduction

    In authentication we check whether the user tying to log in is the correct one or not. Authorization on the other hand is keeping track of what the current user is allowed to see and what should be hidden from him.

    Type of Authentications

    There are two main type of authentication in ASP.NET?

    1. Windows authentication:In this mode, the users are authenticated on their Windows username and password.
    2. Forms based authentication:In this type of authentication, the user will explicitly have to provide his credentials and these credentials, once verified by the server, will let the user to log in.

    This web.config setting enables you to provide a default error page as well as custom error pages for specific error codes:

    The default implementation redirects the user to the specified error page.

    Form and Window Authentication Code:

    This web.config code setting enables you to provide Window and Form Authentication:

     

     




    Namecheap.com
    Avatar of Abdul Rehman

    About

    Abdul Rehman writes on .NET technologies at GetCodeSnippet.com. GetCodeSnippet.com provides you high quality Microsoft .NET development related articles, tutorials and sample code for ASP.NET, C#, VB.NET, AJAX, WCF, WPF, Web Services, Windows Services, SQL Server and other technologies.

    http://getcodesnippet.com

    Leave a Reply