What are the authentication methods in .NET?

There are 4 types of authentications.

  1. WINDOWS AUTHENTICATION
  2. FORMS AUTHENTICATION
  3. PASSPORT AUTHENTICATION
  4. NONE/CUSTOM AUTHENTICATION

The authentication option for the ASP.NET application is specified by using the tag in the Web.config file, as shown below:

1. WINDOWS AUTHENTICATION Schemes

  1. Integrated Windows authentication
  2. Basic and basic with SSL authentication
  3. Digest authentication
  4. Client Certificate authentication

<system.web>
<authentication mode="Windows"/>
</system.web>

2. FORMS AUTHENTICATION
You, as a Web application developer, are supposed to develop the Web page and authenticate the user by checking the provided user ID and password against some user database

<configuration>
<system.web>
<authentication mode="Forms"/>
<forms name="login"loginUrl="login.aspx" />
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</configuration>

3. PASSPORT AUTHENTICATION
A centralized service provided by Microsoft, offers a single logon point for clients. Unauthenticated users are redirected to the Passport site

<configuration>
<system.web>
<authentication mode="Passport">
<passport redirectUrl="login.aspx" />
</authentication>
< authorization>
< deny users="?" />
</authorization>
</system.web>
</configuration>

4. NONE/CUSTOM AUTHENTICATION:
If we don’t want ASP.NET to perform any authentication, we can set the authentication mode to “none”. The reason behind this decision could be: We don’t want to authenticate our users, and our Web site is open for all to use. We want to provide our own custom authentication

Tagged , . Bookmark the permalink.

2 Responses to What are the authentication methods in .NET?

  1. Narayanan says:

    Can you give an Example for this Post?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>