WSTrustServiceHost 构造函数

定义

初始化 WSTrustServiceHost 类的新实例。

重载

WSTrustServiceHost(SecurityTokenServiceConfiguration, Uri[])

使用服务的实例及其指定的基址初始化 WSTrustServiceHost 类的新实例。

WSTrustServiceHost(WSTrustServiceContract, Uri[])

使用服务协定及其指定的基址初始化 WSTrustServiceHost 类的新实例。

WSTrustServiceHost(SecurityTokenServiceConfiguration, Uri[])

使用服务的实例及其指定的基址初始化 WSTrustServiceHost 类的新实例。

public:
 WSTrustServiceHost(System::IdentityModel::Configuration::SecurityTokenServiceConfiguration ^ securityTokenServiceConfiguration, ... cli::array <Uri ^> ^ baseAddresses);
public WSTrustServiceHost (System.IdentityModel.Configuration.SecurityTokenServiceConfiguration securityTokenServiceConfiguration, params Uri[] baseAddresses);
new System.ServiceModel.Security.WSTrustServiceHost : System.IdentityModel.Configuration.SecurityTokenServiceConfiguration * Uri[] -> System.ServiceModel.Security.WSTrustServiceHost
Public Sub New (securityTokenServiceConfiguration As SecurityTokenServiceConfiguration, ParamArray baseAddresses As Uri())

参数

securityTokenServiceConfiguration
SecurityTokenServiceConfiguration

SecurityTokenServiceConfiguration 包含用于初始化服务宿主的 STS 设置。

baseAddresses
Uri[]

一个包含服务主机的基址的 Uri 数组。

注解

使用指定的SecurityTokenServiceConfiguration实例创建默认值WSTrustServiceContract

实例 SecurityTokenServiceConfiguration 用于一次性初始化 ServiceHost;因此,在初始化主机后在配置实例上设置属性不会导致行为更改。

适用于

WSTrustServiceHost(WSTrustServiceContract, Uri[])

使用服务协定及其指定的基址初始化 WSTrustServiceHost 类的新实例。

public:
 WSTrustServiceHost(System::ServiceModel::Security::WSTrustServiceContract ^ serviceContract, ... cli::array <Uri ^> ^ baseAddresses);
public WSTrustServiceHost (System.ServiceModel.Security.WSTrustServiceContract serviceContract, params Uri[] baseAddresses);
new System.ServiceModel.Security.WSTrustServiceHost : System.ServiceModel.Security.WSTrustServiceContract * Uri[] -> System.ServiceModel.Security.WSTrustServiceHost
Public Sub New (serviceContract As WSTrustServiceContract, ParamArray baseAddresses As Uri())

参数

serviceContract
WSTrustServiceContract

WSTrustServiceContract 表示使用的服务协定。

baseAddresses
Uri[]

一个包含服务主机的基址的 Uri 数组。

例外

baseAddressesnull

- 或 -

serviceContractnull

适用于