Implementing an MCMS Membership Provider
In order to support MCMS applications, our MCMS Membership Provider has to implement the ValidateUser()method
, which performs MCMS Forms Authentication. This is the method that will be called when a user submits his or her credentials from the Login
control. The following example shows such an implementation:
public override bool ValidateUser(string strUsername, Membership ProviderForms Authenticationstring strPassword) { bool ValidUser = false; CmsAuthenticationTicket Ticket = CmsFormsAuthentication.AuthenticateAsUser(strUsername, strPassword); if (Ticket != null) { ValidUser = true; } return ValidUser; }
This code will generate an MCMS authentication ticket if authentication is successful. We could now directly call the CmsFormsAuthentication.SetAuthCookie
to set the cookie, but the provider is not the right place to set the cookie. The ValidateUser()
method should only verify if the user credentials provided are valid. In the provider, we would...