Export (0) Print
Expand All

PersonalizationAdministration.ApplicationName Property

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

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

public static string ApplicationName { get; set; }

Property Value

Type: System.String
The application name.

ExceptionCondition
ArgumentException

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

ConfigurationErrorsException

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.

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 noteCaution

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft