manukahn


Hi

I have a workflow which includes several web services input activities.

This workflow is hosted of course by asp.net as a web service. (I use the VS2005 web server CASINI for now)

I want to use sql persistence service . So in web.config I wrote:

<WorkflowRuntime Name="WorkflowServiceContainer">

<CommonParameters>

<add name="ConnectionString" value="Data Source=.;Initial Catalog=WorkflowPersistenceStore;Integrated Security=True"/>

</CommonParameters>

<Services>

<add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add type="System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

UnloadOnIdle="true"/>

</Services>

</WorkflowRuntime>

But when persistence should happen I get the following exception:

Workflow with id "XXX" not found in state persistence store.

for workflows that are hosted in a self host I have no trouble using the persistance service, but when the host is asp.net it looks like it does not reach the persistence database.

I thought about permissions problem but it did not lead me anywhere.

In examples I saw I did not see anything special that should be done for persistence service under web service workflow.

Any Ideas

Thanks

manu cohen-yashar



Re: ASP.Net web services persistance fail with "Workflow with id "xxx" not found in state persistence store"

Tom Lake - MSFT


I would suggest adding the following to you config file to turn on tracing:

<system.diagnostics>

<switches>

<add name="System.Workflow LogToTraceListeners" value="1" />

<add name="System.Workflow.Runtime.Hosting" value="All" />

<add name="System.Workflow.Runtime" value="All" />

<add name="System.Workflow.Runtime.Tracking" value="All" />

<add name="System.Workflow.Activities" value="All" />

</switches>

<trace autoflush="true" indentsize="4">

<listeners>

<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WFTrace.log" />

</listeners>

</trace>

</system.diagnostics>

You are probably getting an exception that is causing the workflow to terminate.






Re: ASP.Net web services persistance fail with "Workflow with id "xxx" not found in state persistence store"

manukahn

No !!! Unfortunately I still get the same exception

Attached is my web.config:

<configuration>

<configSections>

<section name="WorkflowRuntime" type="System.Workflow.Runtime.Configuration.WorkflowRuntimeSection, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</configSections>

<system.diagnostics>

<switches>

<add name="System.Workflow LogToTraceListeners" value="1" />

<add name="System.Workflow.Runtime.Hosting" value="All" />

<add name="System.Workflow.Runtime" value="All" />

<add name="System.Workflow.Runtime.Tracking" value="All" />

<add name="System.Workflow.Activities" value="All" />

</switches>

<trace autoflush="true" indentsize="4">

<listeners>

<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WFTrace.log" />

</listeners>

</trace>

</system.diagnostics>

<WorkflowRuntime Name="WorkflowServiceContainer">

<CommonParameters>

<add name="ConnectionString" value="Data Source=.;Initial Catalog=WorkflowPersistenceStore;Integrated Security=True"/>

</CommonParameters>

<Services>

<add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add type="System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

UnloadOnIdle="true"/>

</Services>

</WorkflowRuntime>

<appSettings/>

<connectionStrings/>

<system.web>

<compilation debug="true">

<assemblies>

<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

<add assembly="System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

<add assembly="System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

<add assembly="System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

<add assembly="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

<add assembly="Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="Microsoft.Build.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>

<authentication mode="Windows"/>

<httpModules>

<add type="System.Workflow.Runtime.Hosting.WorkflowWebHostingModule, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="WorkflowHost"/>

</httpModules>

</system.web>

</configuration>

Thanks for your help

Can you think of more ideas

Manu Chohen-Yashar






Re: ASP.Net web services persistance fail with "Workflow with id "xxx" not found in state persistence store"

Tom Lake - MSFT

Are you saying there were no exceptions in the log file If there weren't then you must not be using the correct Guid. Can you email the log to me My email address is in my profile.






Re: ASP.Net web services persistance fail with "Workflow with id "xxx" not found in state persistence store"

manukahn

I looked at the log and found the problem

it had to do with a class which was not serialzable

thanks

manu





databaseforum