ASP.net authentication method __.net

Source: Internet
Author: User

ASP.net offers 3 authentication methods: Windows Authentication, forms authentication, and passport validation.
Windows Authentication: IIS performs authentication based on the settings of the application. To use this authentication method, anonymous access must be disabled in IIS.
Forms validation: Use cookies to save user credentials and redirect unauthenticated users to a custom login page.
Passport verification: Performed through a centralized authentication service in Microsoft, which provides separate logins and core profile services for member sites.

I. Configuring Windows Authentication
1) Configure IIS Settings

2) Set Web.config
<system.web>
<authentication mode = "Windows" >
<!--notifies the operating system to pass the Trust Book of the currently logged-on user to the browser-->
<authorization>
<!--prohibit anonymous users from accessing-->
<deny users = "?" />
</authorization>
</system.web>
Two. Configure Forms Identity Authentication
1) Configure Web.config
<?xml version= "1.0"?>
<!--
Note:as an alternative to hand editing this file with can use the
Web Admin tool to configure settings for your application. Use
The website->asp.net Configuration option in Visual Studio.
A full list of settings and comments can is found in
Machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.