There are 4 types of authentications.
- WINDOWS AUTHENTICATION
- FORMS AUTHENTICATION
- PASSPORT AUTHENTICATION
- 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
- Integrated Windows authentication
- Basic and basic with SSL authentication
- Digest authentication
- 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
Can you give an Example for this Post?
Thanks Narayanan, I have implemented this post with example…..