แก้ไข

แชร์ผ่าน


SqlProfileProvider.Initialize(String, NameValueCollection) Method

Definition

Initializes the SQL Server profile provider with the property values specified in the ASP.NET application's configuration file. This method is not intended to be used directly from your code.

public:
 override void Initialize(System::String ^ name, System::Collections::Specialized::NameValueCollection ^ config);
public override void Initialize (string name, System.Collections.Specialized.NameValueCollection config);
override this.Initialize : string * System.Collections.Specialized.NameValueCollection -> unit
Public Overrides Sub Initialize (name As String, config As NameValueCollection)

Parameters

name
String

The name of the SqlProfileProvider instance to initialize.

config
NameValueCollection

A NameValueCollection that contains the names and values of configuration options for the profile provider.

Exceptions

The connectionStringName attribute is an empty string ("") or is not specified in the application configuration file for this SqlProfileProvider instance.

-or-

The value of the connection string specified in the connectionStringName attribute value is empty or the specified connectionStringName value does not exist in the application configuration file for this SqlProfileProvider instance.

-or-

The applicationName attribute value exceeds 256 characters.

-or-

The application configuration file for this SqlProfileProvider instance contains an unrecognized attribute.

config is null.

The current trust level is less than Low.

Remarks

ASP.NET uses this method to initialize the SqlProfileProvider with the property values specified in the ASP.NET application configuration file (Web.config). This method is not intended to be used directly from your code.

Applies to

See also