This topic has not yet been rated - Rate this topic

WSTrustServiceHostFactory Class

Windows Identity Foundation


Factory that provides instances of WSTrustServiceHost in managed hosting environments where the host instance is created dynamically in response to incoming messages.


Namespace: Microsoft.IdentityModel.Protocols.WSTrust
Assembly: Microsoft.IdentityModel (in microsoft.identitymodel.dll)
  Dim instance As WSTrustServiceHostFactory
public class WSTrustServiceHostFactory : ServiceHostFactory
public class WSTrustServiceHostFactory extends ServiceHostFactory
public class WSTrustServiceHostFactory extends ServiceHostFactory

The WSTrustServiceHostFactory class is the Windows® Identity Foundation (WIF) implementation of the Windows Communication Foundation (WCF) ServiceHostFactory class. This class can be used to deploy WIF security token services (STS) that are hosted in IIS. By default, the WSTrustServiceHostFactory class uses a WSTrustServiceHost service host with a WSTrustServiceContract service contract implementation.

The following code example demonstrates how to use this class in a .svc file.

<% @ServiceHost Language=C# Debug="true" Factory="Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHostFactory" Service="MySecurityTokenServiceConfiguration" %>

In the preceding configuration example, the Service attribute is pointing to an implementation of the SecurityTokenServiceConfiguration object that will be used by the framework to determine how the WSTrustServiceHost will be constructed. Configuration settings from a web.config file will be applied towards the construction of the ServiceHost instance. The WSTrustServiceHostFactory class may be overridden to customize this behavior.


System.Object
   System.ServiceModel.Activation.ServiceHostFactoryBase
     System.ServiceModel.Activation.ServiceHostFactory
      Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHostFactory
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows 7, Windows Server 2008 R2, Windows Vista SP2, Windows Server 2008 SP2, Windows Server 2003 SP2 (32-bit or 64-bit)
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ