SimpleMembershipProvider.ApplicationName Property

Gets or sets the name of the application.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

override function get ApplicationName () : String 
override function set ApplicationName (value : String)

Property Value

Type: System.String
The name of the application.

The ApplicationName property value is stored in the data source with related user information in order to associate the user information with a particular application. This property uses the ApplicationPath property value if it is not set explicitly.

The SimpleMembershipProvider class stores user information uniquely for each application. Multiple ASP.NET applications can use the same data source without running into a conflict if duplicate user names are created. Alternatively, multiple ASP.NET applications can share a membership data source by specifying the same ApplicationName value. For example the data stored for "Application A" will be distinct from the data stored for "Application B". However, if you want both applications to have access to the same data, you could have both applications use the same ApplicationName value, such as "Application AB".


If the SimpleMembershipProvider class has been initialized using a call to the WebSecurity.InitializeDatabaseConnection() method, this property is not supported and will throw a NotSupportedException exception. However, if the WebSecurity.InitializeDatabaseConnection() method has not been called, and if you have configured your site to use the standard ASP.NET membership provider, this property is passed through to the standard membership provider. For more information, see the SimpleMembershipProvider class overview.