Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CreateServiceHost Method (Type, Uri[])
Collapse the table of content
Expand the table of content

ServiceHostFactory.CreateServiceHost Method (Type, Uri[])

Creates a ServiceHost for a specified type of service with a specific base address.

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

protected virtual ServiceHost CreateServiceHost(
	Type serviceType,
	Uri[] baseAddresses


Type: System.Type

Specifies the type of service to host.

Type: System.Uri[]

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

Return Value

Type: System.ServiceModel.ServiceHost
A ServiceHost for the type of service specified with a specific base address.

This example shows how to create an override implementation of the CreateServiceHost(Type, Uri[]) method:

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 3.5 SP1
© 2015 Microsoft