ablei2000
ablei2000

Reputation: 409

How to code hosting of the WF with WC 3.5 ReciveActivity in Windows Service (XP)?

I created a small VS solution that includes WF with WCF ReceiveActivity project (using basicHttpBinding) and a number of plain C# services. They all work perfectly when tested from VS 2008 using WCFTestClient.

I deployed them into a single Windows Service. All but WF service work fine. I spent 6 hours browsing, but didn’t find a solution that works. Please help.

Upvotes: 0

Views: 142

Answers (1)

Maurice
Maurice

Reputation: 27632

You should be using the WorkflowServiceHost instead of the normal ServiceHost. The WorkflowServiceHost does all the usual WCF related stuff but also makes sure a workflow runtime is created and the required workflow routing environment is setup.

See this blog post for how to do so. This second post show a bit more about how to change the configuration.

BTW. In general you should be using the context bindings like the basicHttpContextBinding and wsHttpContextBinding as they pass the context information containing the workflow instanceId with the messages.

Upvotes: 1

Related Questions