Hosting WorkFlow in IIS correlation problem RRS feed

  • Question

  • We are have an issue regarding correlation in WorkFlows hosting in IIS. We are using a Declarative Flowchart workflow using the address below which has been added into your web client project via a Service Reference. http://vmwinxp/WorkFlow/Service2.xamlx?wsdl

    The weird thing is that if we host the workflow using command prompt like the code below is works fine.

    Is there a special way you have to host it in IIS except from point a virtual directory at the folder with the XAMLX file in?

    Any help would be much apprepciated!!!

    static void Main(string[] args)
                string baseAddress = "http://localhost:8089/CarRentalService";

                using (WorkflowServiceHost host = new WorkflowServiceHost(typeof(RentCar), new Uri(baseAddress)))
                    host.Description.Behaviors.Add(new ServiceMetadataBehavior() { HttpGetEnabled = true });

                    Console.WriteLine("Car rental service listening at: " + baseAddress);
                    Console.WriteLine("Press ENTER to exit");


    Wednesday, August 26, 2009 8:05 PM


  • Hi Daniel,
    Did you get your web.config working? Let me know if I can help in any way otherwise I'll go ahead and mark this thread as answered.

    Tuesday, September 29, 2009 7:00 PM

All replies

  • What is the issue you are having?  Are you able to correctly make the first call to the service, but not subsequent calls?  What error do you see?  Have you tried adding a persistence provider to the host in the IIS setup? 

    Check out Pluralsight On Demand! http://www.pluralsight.com/main/olt/
    Thursday, August 27, 2009 2:42 PM
  • Can you include the XAMLX for your service? You shouldn't need persistence for correlation to work...
    Saturday, August 29, 2009 2:13 AM
  • Apologises for the late reply.

    Having do a bit more tickering and researching we have found out exactly what the issue is we need to find a solution too:

    Having created a new WCF Service Application and added a Declarative FlowChart Service (xamlx) file to the project we then found we had to manually update the Web.Config file as shown below:

    This with an update to the Service Reference in the Web Project seemed to make the Correlation work. Ideally we would like something alot simplier where we could just create a XAMLX workflow and then drop it into a folder attached to a IIS virtual directory and it would work. We have tried this previously and the correlation would not work meaning we could call the first receive but it would go no further.

    Any ideas how we could do this?

    To give you some more information we are deploying a solution where our clients could create their own workflows using the designer and then deploy these. Ideally we could like this deployment process to a simply move of the file and not editing the Web.Config as it may get messy with 100 references in the web.config file with say only 4 currently used due to versioning, etc...

    Obviously the next step after that is to create the Service Reference code on the file but we may be able to do something using svcutil.... any ideas?

          <service name="Service1" behaviorConfiguration="WcfService2.Service1Behavior">
            <!-- Service Endpoints -->
            <endpoint address="" binding="wsHttpBinding" contract="IMatterService">
                  Upon deployment, the following identity element should be removed or replaced to reflect the
                  identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity
                <dns value="localhost"/>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
            <behavior name="WcfService2.Service1Behavior">
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>

    Wednesday, September 2, 2009 9:15 AM
  • Further to my notes above would it be possible to embed the Web.Config information inside the XAMLX file? We have read somewhere that it way be possible in the

    <WorkflowServiceImplementation ConfigurationName="Service1" Name="Service1">

    section of the xml source for the Workflow?
    Wednesday, September 2, 2009 9:26 AM
  • Hi Daniel,
    I'm not sure what you are modifying in the config file...are you changing the <identity> so that it is no longer set to "localhost"? How are you configuring the endpoint on the client side?

    Wednesday, September 9, 2009 11:23 PM
  • Hi Daniel,
    Yes you should be able to do this using the WorkflowServiceImplementation. With WF4 you should be able to declaratively define your workflow service and deploy it without a config file. I don't know how well this is implemented in Beta1 but you'll see more about writing WF Services in XAML with the release of Beta2.

    Wednesday, September 9, 2009 11:52 PM
  • Hi Daniel,
    Did you get your web.config working? Let me know if I can help in any way otherwise I'll go ahead and mark this thread as answered.

    Tuesday, September 29, 2009 7:00 PM
  • AmyMac,
    will we get a sample in the training kit for the embeded config?
    Karol Deland, Québec
    Wednesday, September 30, 2009 2:00 AM
  • I don't believe there is a sample with the embedded config. There are samples of declarative workflow services but they have limited config files.

    Wednesday, October 7, 2009 8:45 PM