Manages storage of membership information for an ASP.NET application in a MySQL database.
Namespace:
MySql.Web.Security
Assembly:
MySql.Web (in MySql.Web.dll) Version: 6.2.2.0
Syntax
C# |
---|
public sealed class MySQLMembershipProvider : MembershipProvider |
Visual Basic (Declaration) |
---|
Public NotInheritable Class MySQLMembershipProvider _ Inherits MembershipProvider |
Visual C++ |
---|
public ref class MySQLMembershipProvider sealed : public MembershipProvider |
Remarks
This class is used by the Membership and MembershipUser classes to provide membership services for ASP.NET applications using a MySQL database.
Examples
CopyC#
<configuration> <connectionStrings> <add name="LocalMySqlService" connectionString="server=localhost;user id=myuser;password=mypass;database=test" /> </connectionStrings> <system.web> <authentication mode="Forms" > <forms loginUrl="login.aspx" name=".ASPXFORMSAUTH" /> </authentication> <authorization> <deny users="?" /> </authorization> <membership defaultProvider="MySQLProvider" userIsOnlineTimeWindow="15"> <providers> <add name="MySQLProvider" type="MySql.Web.Security.MySQLMembershipProvider" connectionStringName="LocalMySqlService" applicationName="MyApplication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" /> </providers> </membership> </system.web> </configuration>
Inheritance Hierarchy
System..::.Object
System.Configuration.Provider..::.ProviderBase
System.Web.Security..::.MembershipProvider
MySql.Web.Security..::.MySQLMembershipProvider
System.Configuration.Provider..::.ProviderBase
System.Web.Security..::.MembershipProvider
MySql.Web.Security..::.MySQLMembershipProvider