SqlPersonalizationProvider.ApplicationName Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the name of the application to store and retrieve personalization information for.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

public:
virtual property String^ ApplicationName {
	String^ get () override;
	void set (String^ value) override;
}
/** @property */
public String get_ApplicationName ()

/** @property */
public void set_ApplicationName (String value)

public override function get ApplicationName () : String

public override function set ApplicationName (value : String)

Property Value

The name of the application to store and retrieve personalization information for. The default is the ApplicationVirtualPath property value for the current Request.

Exception typeCondition

ProviderException

The property was set to a string with a length greater than 256 characters.

The ApplicationName property is used by the SqlPersonalizationProvider class to group user information. By qualifying user information with an application name, you can store information for multiple applications in a single database without running into conflicts between duplicate user names. Also, multiple ASP.NET applications can use the same user database by specifying the same value in the ApplicationName property. The ApplicationName property can be set programmatically, or it can be set declaratively in the configuration file for the Web application using the applicationName attribute in the <providers> section.

If a value is not specified for the applicationName attribute in the configuration file for the Web application, then the ApplicationVirtualPath property value for the first request made to the application is used.

Caution noteCaution

Because a single default personalization provider instance is used for all the requests served by an HttpApplication object, you can have multiple requests executing concurrently and attempting to set the ApplicationName property value. The ApplicationName property is not thread-safe for multiple writes, and changing the ApplicationName property value can result in unexpected behavior for multiple users of an application. It is recommended that you avoid code to allow users to set the ApplicationName property unless required. An example of an application where setting the ApplicationName property might be required is an administrative application that manages personalization data for multiple applications. Such an application should be a single-user application and not a Web application.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: