WorkflowServiceHostFactory.CreateServiceHost Method (String, Uri[])

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a WorkflowServiceHost from a string that contains either the file name of the workflow markup file or the type name of the workflow service type and the base address of the service specified.

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

public override ServiceHostBase CreateServiceHost(
	string constructorString,
	Uri[] baseAddresses
)

Parameters

constructorString
Type: System.String

The file name of the workflow markup file that defines the workflow service or the type name of the workflow service type.

baseAddresses
Type: System.Uri[]

An array of type Uri that contains the base addresses for the hosted service.

Return Value

Type: System.ServiceModel.ServiceHostBase

A ServiceHostBase object associated with the workflow service. The default implementation returns a WorkflowServiceHost object with the specified base addresses.

The constructorString argument could be either a fully qualified workflow type name or it could be the relative file path of the workflow definition file declared in the .svc file in which ServiceHostFactory directives are placed.

System_CAPS_noteNote

To associate a rule definition with a workflow definition, name the rule definition file the same name as the workflow definition file with a .rules extension and place it in same directory as the workflow definition file. For example, the rules definition file CalculatorServiceWorkflow.rules must be in the same directory as CalculatorServiceWorkflow.xoml.

The following is an example of a type-based reference to the workflow service CalculatorServiceWorkflow.

<%@ServiceHost language=c# Debug="true" Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory" Service="CalculatorServiceWorkflow" %>

The following is an example of a workflow definition file reference to the workflow service CalculatorServiceWorkflow.

<%@ServiceHost language=c# Debug="true" Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory" Service="CalculatorServiceWorkflow.xoml" %>

.NET Framework
Available since 3.5
Return to top
Show: