How to analyze a Workflow foundation 4.0 persistence problem

Hello,

Sometimes we get the following exception:
An error processing the current work item has caused the workflow to abort. See the inner exception for details. InnerException Message: The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activities.Persistence/command}SaveWorkflow was interrupted by an error.

We have to write this section in the web.config in order to write the whole trace exception in a file.

 <system.diagnostics>
    <sources>
      <source name="System.Activities.DurableInstancing" switchValue="Verbose">
        <listeners>
          <add name="textListener" />
          <remove name="Default" />
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="textListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\Log\persistenceproblem.txt" traceOutputOptions="ProcessId, DateTime" />
    </sharedListeners>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <add name="textListener" />
      </listeners>
    </trace>
  </system.diagnostics> 

Hope this helps

About these ads

2 comments

  1. Hi,

    What other values apart from Verbose can be used here please?

    1. Error, warning…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 157 other followers

%d bloggers like this: