locked
Does WorkflowServiceHost require IIS? RRS feed

  • Question

  • Does using WFSH (workflows that have receive activities) imply that I must have IIS?

    I know I can self host, add code like you see below, but it seems a bit ridiculous to me to have to put in the path to the file to have Load convert it to a WorkflowService.  My thought is to just create a .xaml file and then do self-hosting as you see in the second set of code. Thoughts on the best way to do this?

      wfs = (WorkflowService)System.Xaml.XamlServices.Load(@"C:\VSTestProjects\SvcAggregatorWF.xamlx");             wfServiceHostA = new System.ServiceModel.Activities.WorkflowServiceHost(wfs);             wfServiceHostA.AddServiceEndpoint("ITestService"newBasicHttpBinding(), "http://localhost:2424/SvcAggregatorWF.xamlx");             wfServiceHostA.Open();

    Other code, using .xaml file

    WorkflowServiceHost host = new WorkflowServiceHost(new CountingWorkflow2(), new Uri(hostBaseAddress));
     
                // Add service endpoint.
                host.AddServiceEndpoint("ICountingWorkflow"new BasicHttpBinding(), "");
                
                // Open service host.
                host.Open();
     
                // Create a client that sends a message to create an instance of the workflow.
                ICountingWorkflow client = ChannelFactory<ICountingWorkflow>.CreateChannel(new BasicHttpBinding(), new EndpointAddress(hostBaseAddress));
                client.start();

    STom

    Wednesday, June 6, 2012 5:31 PM

Answers

  • Hi Stom,

    In case this was your question: WorkflowServiceHost does not have any dependency upon IIS installation.

    An Activity object or WorkflowService used in WorkflowServiceHost does not have to be loaded from a XAML file or XAMLX file - any Activity object or WorkflowService created by any means can be valid.

    This is different to using a web host like IIS because IIS figures out how to host the workflow based on strategies like matching file extensions, which introduces a dependency on file name.

    Tim

    • Marked as answer by LeoTang Friday, June 15, 2012 1:43 AM
    Monday, June 11, 2012 8:53 PM

All replies

  • Hi,

    With self-host workflow service, IIS isn't required. Xamlx is specially for ASP.NET, since you self-host the workflow service, you are free to choose the second set.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 7, 2012 5:48 AM
  • Hi Stom,

    In case this was your question: WorkflowServiceHost does not have any dependency upon IIS installation.

    An Activity object or WorkflowService used in WorkflowServiceHost does not have to be loaded from a XAML file or XAMLX file - any Activity object or WorkflowService created by any means can be valid.

    This is different to using a web host like IIS because IIS figures out how to host the workflow based on strategies like matching file extensions, which introduces a dependency on file name.

    Tim

    • Marked as answer by LeoTang Friday, June 15, 2012 1:43 AM
    Monday, June 11, 2012 8:53 PM