Security. Login(String, String, Boolean) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Logs the user in.
public static bool Login (string userName, string password, bool persistCookie = false);
static member Login : string * string * bool -> bool
Public Shared Function Login (userName As String, password As String, Optional persistCookie As Boolean = false) As Boolean
The user name.
(Optional) true to specify that the authentication token in the cookie should be persisted beyond the current session; otherwise false. The default is false.
true if the user was logged in; otherwise, false.
The Initialize(String, NameValueCollection) method was not called.-or-The InitializeDatabaseConnection method was not called.-or-The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator.