ServiceHostFactory.CreateServiceHost Method (String, Uri[])
.NET Framework 3.0
Creates a ServiceHost with specific base addresses and initializes it with specified data.
Namespace: System.ServiceModel.Activation
Assembly: System.ServiceModel (in system.servicemodel.dll)
Assembly: System.ServiceModel (in system.servicemodel.dll)
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
Not applicable.
Parameters
- constructorString
The initialization data passed to the ServiceHostBase instance being constructed by the factory.
Return Value
A ServiceHost with specific base addresses.This example shows how to use the CreateServiceHost(String,Uri[]) method:
public override ServiceHostBase CreateServiceHost (string service, Uri[] baseAddresses) { // The service parameter is ignored here because we know our service. ServiceHost serviceHost = new ServiceHost(typeof(HelloService), baseAddresses); return serviceHost; }
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: