Link to home
Start Free TrialLog in
Avatar of priyanka_kothari
priyanka_kothariFlag for India

asked on

Persistence IN WCF Workflow Service 4.0

I have created a WCF Workflow service in .NET 4.0.. How to implement persistence in it?

I have added following in web.config:

 <add name ="ConnStringPersistence" connectionString="Data Source=(local);Integrated Security=SSPI;Initial Catalog=SqlWorkflowInstanceStore;" providerName="System.Data.SqlClient"/>

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>

          <!-- 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="true"/>
          <sqlWorkflowInstanceStore connectionStringName="ConnStringPersistence"/>
          <workflowIdle timeToUnload="0"/>
        </behavior>

      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>


When I add persist activity from toolbox, I get an entry in table  "InstancesTable" with exception "Persist activities cannot be contained within no persistence blocks."

How to solve it?
ASKER CERTIFIED SOLUTION
Avatar of Aaron Jabamani
Aaron Jabamani
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial