SqlRoleProvider.Initialize(String, NameValueCollection) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用 ASP.NET 应用程序的配置文件中指定的属性值初始化SQL Server角色提供程序。 此方法不应直接从代码使用。
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)
参数
- name
- String
要初始化的 SqlRoleProvider 实例的名称。
- config
- NameValueCollection
包含 NameValueCollection 角色提供程序的配置选项的名称和值。
例外
ASP.NET 应用程序未在 Medium 信任或更高版本上运行。
config 是 null。
该 connectionStringName 属性为空,或者此 SqlRoleProvider 实例的应用程序配置文件中不存在。
-或-
该 applicationName 属性超过 256 个字符。
-或-
此 SqlRoleProvider 实例的应用程序配置文件包含无法识别的属性。
注解
此方法使用 ASP.NET 应用程序配置文件(Web.config)中指定的属性值初始化 SqlRoleProvider,并且不会直接从代码使用。