WSTrustServiceHostFactory.CreateServiceHost (Método, (String, Uri[]))
Creates a ServiceHost instance. To register a Security Token Service in IIS create a .svc files in the format that assigns ServiceHost, Factory, and Service parameters.
Espacio de nombres: Microsoft.IdentityModel.Protocols.WSTrust
Ensamblado: Microsoft.IdentityModel (en microsoft.identitymodel.dll)
Uso
Dim instance As WSTrustServiceHostFactory Dim constructorString As String Dim baseAddresses As Uri() Dim returnValue As ServiceHostBase returnValue = instance.CreateServiceHost(constructorString, baseAddresses)
Sintaxis
'Declaración
Public Overrides Function CreateServiceHost ( _
constructorString As String, _
baseAddresses As Uri() _
) As ServiceHostBase
public override ServiceHostBase CreateServiceHost (
string constructorString,
Uri[] baseAddresses
)
public:
virtual ServiceHostBase^ CreateServiceHost (
String^ constructorString,
array<Uri^>^ baseAddresses
) override
public ServiceHostBase CreateServiceHost (
String constructorString,
Uri[] baseAddresses
)
public override function CreateServiceHost (
constructorString : String,
baseAddresses : Uri[]
) : ServiceHostBase
Parámetros
- constructorString
The STS name that is passed to the Service argument in the .svc file.
- baseAddresses
The address under which the .svc file is registered.
Valor devuelto
An instance of Service Host.
Ejemplo
The following code snippet shows how to use this class in an .svc file.
<%@ServiceHost Factory="Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHostFactory" Service="SimpleActiveSTS.CustomSecurityTokenServiceConfiguration"%>
Excepciones
Tipo de excepción | Condición |
---|---|
ArgumentNullException | An input argument is null. |
InvalidOperationException | The constructorString is not of type SecurityTokenServiceConfiguration. |
Notas
Creates a ServiceHost instance. To register a Security Token Service in IIS create a .svc files in the format that assigns ServiceHost, Factory, and Service parameters.
Seguridad para subprocesos
Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para subprocesos.No se garantiza que los miembros de instancias sean seguros para subprocesos.
Plataformas
Plataformas de desarrollo
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
Change History
Vea también
Referencia
WSTrustServiceHostFactory (Clase)
WSTrustServiceHostFactory (Miembros)
Microsoft.IdentityModel.Protocols.WSTrust (Espacio de nombres)