Unified authentication configuration for from authentication under Asp.net

Source: Internet
Author: User

If you need to use form authentication of Asp.net to log on to different second-level domain names, you need to modify the Web. config configuration and change the domain attribute in the from authentication configuration node to the same domain name, for example, website.com. Example:

<Authentication mode = "forms">

<Forms name = ". Framework" defaulturl = "/default. aspx" loginurl = "/login. aspx" Domain = ".website.com" Path = "/"> </Forms>

</Authentication>

In addition, if we use load balancing to deploy dynamic websites on multiple Web servers. We also need to set the same mainchkey in Web. config so that the encrypted authentication cookies generated on server A can be read on server B. The configuration is as follows:

<Machinekey validationkey = "encryption" decryptionkey = "encryption" validation = "sha1" decryption = "AES"/>

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.