ServiceHostFactory::CreateServiceHost Method (String^, array<Uri^>^)

 

Creates a ServiceHost with specific base addresses and initializes it with specified data.

Namespace:   System.ServiceModel.Activation
Assembly:  System.ServiceModel.Activation (in System.ServiceModel.Activation.dll)

public:
virtual ServiceHostBase^ CreateServiceHost(
	String^ constructorString,
	array<Uri^>^ baseAddresses
) override

Parameters

constructorString
Type: System::String^

The initialization data passed to the ServiceHostBase instance being constructed by the factory.

baseAddresses
Type: array<System::Uri^>^

The Array of type Uri that contains the base addresses for the service hosted.

Return Value

Type: System.ServiceModel::ServiceHostBase^

A ServiceHost with specific base addresses.

Exception Condition
ArgumentNullException

baseAddress is null.

InvalidOperationException

There is no hosting context provided or constructorString is null or empty.

This example shows how to use the CreateServiceHost(String^, array<Uri^>^) method:

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: