Five steps to create a WCF Durable service – Easy WCF
Skip to content

Five steps to create a WCF Durable service

Step 1: Create a WCF service project

  •  Open Visual Studio.
  •  From File -> New Project->WCF Service-> Name it as Durable Service.

WCF Durable Service

Step 2: Define Interface and Decorate Operation and Service contract

Step 3: Service Implementation

    • You need to add [Serializable] And [DurableService()] attribute to the service implementation.
    • Set CanCreateInstance = true property to the operation in which instance state has to be persisted and set CompletesInstance = true when state has to be destroyed. In this implementation, we are going to persist the ‘currentValue’ variable value to the database.

Step 4: Set up data store environment

  • Microsoft provides inbuilt sqlPersistance provider.
  • To set up the database environment, run the these sql query located at following location ‘C:\Windows\Microsoft.NET\Framework\v3.5\SQL\EN’
    • SqlPersistenceProviderSchema.sql
    • SqlPersistenceProviderLogic.sql

Step 5: Set up data store environment

  • configure the persistence provider

© 2015, admin. All rights reserved.

2 thoughts on “Five steps to create a WCF Durable service

  1. Pingback: Five steps to Test WCF Durable service | Easy WCF

  2. Pingback: What is WCF Durable Service? | Easy WCF

Leave a Reply

Your email address will not be published. Required fields are marked *