none
Hosting a Sequential Worflow Service Library in IIS RRS feed

  • Question

  • Hi all,

     

    I'm with the VS2008 beta 2, and I can't find a way to host a Sequential Workflow Service Library in IIS.

    I can do it fine with a WCF Service Library, but not with a Workflow based WCF Service.

     

    Some help would be appreciated! Smile

     

    Regards,

    Loïc

    Friday, November 16, 2007 1:20 PM

Answers

  • Could you try the full name instead

     

    Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory"

     

     

    if that does not work,  try check whether System.WorkflowServices.dll is in your machine.

    gacutil /l System.workflowServices

     

     

     

    Tuesday, November 20, 2007 8:36 PM

All replies

  • Have you done the following:

     

    1) Create the virtual directory and put your library in the "bin" subdirectory

    2) Copy the app.config into a web.config in that virtual directory.

    3) Create a .svc file in that virtual directory as

     

    <%@ServiceHost  Factory="WorkflowServiceHostFactory" Service="Your_Service_Type"%>

     

    After you have done above,  visit the .svc file from explorer you should see a page saying "you have created a service....."

     

    Monday, November 19, 2007 6:38 PM
  • I couldn't get it worked that way. So I created a brand new ASP.net web site, then copy/rename the app.config, create the service.svc. But I got an error when displaying the page (the message is an approximated translation because I had a french one):

    The CLR type "WorkflowServiceHostFactory" couldn't be loaded during the compilation of the service.

     

    Am I missing an assembly ? How to fix that up ?

     

    Thanks for helping!

     

    Loïc

    PS: Do you know how to display the ASP.net / .net messages in English, because having them in French doesn't help you when you want to look for an error on the web. Sad

    Tuesday, November 20, 2007 6:45 AM
  • Could you try the full name instead

     

    Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory"

     

     

    if that does not work,  try check whether System.WorkflowServices.dll is in your machine.

    gacutil /l System.workflowServices

     

     

     

    Tuesday, November 20, 2007 8:36 PM
  • Great !!! It worked !

     

    The main issue was that I was creating a WCF Service Web Site instead of a basic Web site, looks like it wasn't the right thing to do !

     

    Thank you !

     

    Loïc

    Wednesday, November 21, 2007 4:10 PM
  • I was facing the same issue. It got resolved only after I put the fully qualified name of the System.WorkflowServices assembly in the .svc file. Now my Service.svc looks like:

    <%@ ServiceHost Language="VB"

    Service="StateMachineWFServiceLibrary.ClaimProcessor"

    Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory, System.workflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

    Hope that might help others who are stuck like I was !

    • Proposed as answer by dahiya Tuesday, November 25, 2008 10:22 PM
    Tuesday, November 25, 2008 7:50 PM
  • hey guys,

    i am facing issues with hosting a sequential workflow service in iis 7. i added that factory setting in my .svc and created a wcf web site and i am still getting the following error:

    This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
    Parameter name: item

    This is the stack trace:


    [ArgumentException: This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
    Parameter name: item]
       System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item) +11520590
       System.Collections.Generic.SynchronizedCollection`1.Add(T item) +67
       System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses) +49
       System.ServiceModel.WorkflowServiceHost..ctor(WorkflowDefinitionContext workflowDefinitionContext, Uri[] baseAddress) +41
       System.ServiceModel.Activation.WorkflowServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +546
       System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +516
       System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
       System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

    [ServiceActivationException: The service '/WorkflowServiceTutorialSite/Service.svc' cannot be activated due to an exception during compilation.  The exception message is: This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
    Parameter name: item.]
       System.ServiceModel.AsyncResult.End(IAsyncResult result) +11531006
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
       System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
     
    i am new to all this, please any assistance is needed.

    thanks


    my favorite place on the net is msdn!
    • Edited by msdner1 Thursday, March 19, 2009 1:50 AM edit
    Thursday, March 19, 2009 1:49 AM