ASP. NET 2.0 second-level domain name forms authentication mode shared login status

Source: Internet
Author: User
Tags subdomain name
In Asp.net 1.1, for how to share the login status in the form Authentication Mode of the second-level domain name, refer to the following Article :

Http://www.cnblogs.com/caomao/archive/2005/07/05/186606.html

The implementation method in Asp.net 2.0 is simpler. You only need to modify the Web. config file. The modification method is as follows:

< Authentication Mode = "Forms" >
< Forms Name = ". Aspnetform" Domain = "Yourdomain.com" Loginurl = "/Login. aspx" Defaurl URL = "/Default. aspx" Protection = "All" Timeout = "30" Path = "/" Requiressl = "False" Slidingexpiration = "True" Enablecrossappredirects = "False" Cookieless = "Usedeviceprofile"   />
</ Authentication >

Note the domain attribute of the forms node. If your primary domain name and subdomain name are www.abc.com, 123.abc.com ,....., in this case, you should enter abc.com, that is, domain = "abc.com ".

It's easy. I wish you success!

Related Article

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.