ApplicationName Property

MySQL Connector/Net

The name of the application using the MySQL membership provider.

Namespace:  MySql.Web.Security
Assembly:  MySql.Web (in MySql.Web.dll) Version: 6.2.2.0

Syntax

C#
public override string ApplicationName { get; set; }
Visual Basic (Declaration)
Public Overrides Property ApplicationName As String
Visual C++
public:
virtual property String^ ApplicationName {
	String^ get () override;
	void set (String^ value) override;
}

Field Value

The name of the application using the MySQL membership provider. The default is the application virtual path.

Remarks

The ApplicationName is used by the MySqlMembershipProvider to separate membership information for multiple applications. Using different application names, applications can use the same membership database. Likewise, multiple applications can make use of the same membership data by simply using the same application name. Caution should be taken with multiple applications as the ApplicationName property is not thread safe during writes.

Examples

The following example shows the membership element being used in an applications web.config file. The application name setting is being used.
CopyC#
<membership defaultProvider="MySQLMembershipProvider">
  <providers>
      <add name="MySqlMembershipProvider"
          type="MySql.Web.Security.MySQLMembershipProvider"
          connectionStringName="LocalMySqlServer"
          enablePasswordRetrieval="true"
          enablePasswordReset="false"
          requiresQuestionAndAnswer="true"
          requiresUniqueEmail="false" 
          passwordFormat="Encrypted"
          maxInvalidPasswordAttempts="3" 
          passwordAttemptWindow="20" 
          minRequiredNonAlphanumericCharacters="1" 
          minRequiredPasswordLength="11" 
          applicationName="MyApplication" />
  </providers>
</membership>

See Also