The Problem SolverWIndows Workflow Foundation
HomeShow ChangesEditPrintRecent ChangesSubscriptionsLost and FoundFind ReferencesRename



28-4-2008 16:11:0428-4-2008 16:10:2828-4-2008 16:10:0328-4-2008 16:09:3428-4-2008 16:03:43

List all versions

Manually Publish Workflow Web Service

Fortunatly it isn't all that had to publish the workflow manually. Just add a web service project to the solution and add an ASMX file with the following content:

<%@ WebService Class="WebServiceInput.Workflow1_WebService" %>

The workflow class is named "WebServiceInput.Workflow1" and just add the "_WebService" suffix to it. Next add a reference from the web service project to the assembly containing the workflow.

Don't forget to also add refrences to the System.Workflow.Activities, System.Workflow.ComponentModel and System.Workflow.Runtime assemblies used at runtime.

Next create a WorkflowRuntime config section like so:

        <section name="WorkflowRuntime" 
                   System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, 


    <WorkflowRuntime Name="WorkflowRuntime">
            <add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, 
                 System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, 
            <add type="System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService, 
                 System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, 

Now you should be good to go

The only thing now is adding conversation support. Right now you will het this error

    "System.Web.Services.Protocols.SoapException: Server was unable to process request.
     ---> System.InvalidOperationException: Current session has no workflow instance 
     associated with it. Send activation message to start new instance in current session." 

even after adding a CookieContainer (see WorkflowWebService). The problem is that the cookie is never added to the response as this is done by WorkflowWebHostingModule http module. So to enable conversations just add the following to the web.config.

      <add type="System.Workflow.Runtime.Hosting.WorkflowWebHostingModule, 
                 System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, 
Wiki Usage

This wiki site is supposed to be a shared resource. As a shared resource everyone is encouraged to add new content or modify existing content!

Enjoy the WF wiki.

Recent Topics