Redigera

Dela via


PersonalizationAdministration.ApplicationName Property

Definition

Gets or sets the name of the application specified by the provider.

public:
 static property System::String ^ ApplicationName { System::String ^ get(); void set(System::String ^ value); };
public static string ApplicationName { get; set; }
static member ApplicationName : string with get, set
Public Shared Property ApplicationName As String

Property Value

The application name.

Exceptions

The provider for a personalization provider defined in configuration is not of the correct type.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

Remarks

The application name affects the data retrieved and saved by the personalization provider, and allows for multiple applications to either share data by setting an identical application name, or partition data within the same database by specifying different application names. The application name is found in the personalization provider section of the Web.config or System.config file.

Caution

Because a single default profile 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 profile data for multiple applications. Such an application should be a single-user application and not a Web application.

Applies to

See also