SqlPersonalizationProvider.Initialize(String, NameValueCollection) 方法
定义
实现 Microsoft SQL Server 个性化设置提供程序所需的初始化过程。Implements the initialization procedures required for a Microsoft SQL Server personalization provider. 此方法不能直接在代码中使用。This method is not intended to be used directly from your code.
public:
override void Initialize(System::String ^ name, System::Collections::Specialized::NameValueCollection ^ configSettings);
public override void Initialize (string name, System.Collections.Specialized.NameValueCollection configSettings);
override this.Initialize : string * System.Collections.Specialized.NameValueCollection -> unit
Public Overrides Sub Initialize (name As String, configSettings As NameValueCollection)
参数
- name
- String
应用程序在配置文件中显示的名称。The application name as it appears in the configuration file.
- configSettings
- NameValueCollection
应用程序的配置设置。The configuration settings for the application.
例外
没有为该提供程序配置连接字符串。No connection string is configured for the provider.
- 或 --or- 无法找到提供程序的连接字符串。The connection string for the provider cannot be found.
- 或 --or-
除配置设置中描述的特性外,提供程序的 <add> 元素还有其他特性。There are additional attributes on the provider's <add> element beyond those described in the configuration settings.
- 或 --or- 应用程序名的长度大于 256 个字符。The length of the application name is greater than 256 characters.
- 或 --or- 承载应用程序的应用程序域运行在低于 Medium 的信任级别上。The application domain hosting the application is running at a trust level below Medium trust.
configSettings 为 null。configSettings is null.
注解
此方法提供了用于将个性化设置用于 SQL 数据库的初始化过程,但不应在代码中直接使用。This method provides the initialization procedures for using personalization with a SQL database and is not intended to be used directly from your code.