In the example above, we used the CmsFormsAuthentication.AuthenticateAsUser()
method to get the authentication ticket. There are other ways to retrieve this ticket, detailed next.
AuthenticateAsCurrentUser()
logs in with the credentials of the current Windows user. Using this method, you do not have to ask for user names and passwords as these are already obtained from theWindowsIdentity.GetCurrent()
method. However, because you have configured IIS to allow anonymous access to the site, you will always be using the credentials of the ASPNET account.AuthenticateAsGuest()
logs in with the credentials of the MCMS guest account. If guest account is enabled, the user will be issued a ticket that gives access to portions of the site that are open to guests.AuthenticateUsingWindowsToken()
logs in with the credentials of a Windows user. It is usually used when impersonating a logon session with a Windows account.