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"/>