A factory that provides instances of WebServiceHost in managed hosting environments where the host instance is created dynamically in response to incoming messages.
public class WebServiceHostFactory : ServiceHostFactory
Public Class WebServiceHostFactory _ Inherits ServiceHostFactory
Dim instance As WebServiceHostFactory
public ref class WebServiceHostFactory : public ServiceHostFactory
public class WebServiceHostFactory extends ServiceHostFactory
The managed hosting environments that support dynamic activation are Internet Information Services (IIS) and Windows Process Activation Service (WAS).
If you have implemented a custom derivative of WebServiceHost, consider also implementing a factory that derives from the WebServiceHostFactory class.
The following example shows how to derive a class from WebServiceHostFactory.
In order to have your derived Web service host factory used you will need to specify it in a .SVC file. The following example illustrates the syntax used in an .SVC file.
<%@ServiceHost language=c# Service="Microsoft.Samples.MyWCFService" Factory="Microsoft.Samples.MyWebServiceHostFactory" %>
Windows Vista, Windows XP SP2, Windows Server 2003