Five steps to Test WCF Durable service – Easy WCF
Skip to content

Five steps to Test WCF Durable service

This is a continuation to Create WCF Durable Service. Please read it before proceeding.

In this article, we will discuss how to test the WCF Durable service.

Step 1: Create the console client application and name it as DurableServiceClient

WCF Durable Service

Step 2: Add following reference to client application

  • System.ServiceModel
  • System.WorkflowService

WCF Durable Service

Step 3: Add WCF service as Service Reference to the project and name it as SimpleCalculatorService

WCF Durable Service

Step 4: Create the Helper Class

Helper class is used to Store, Retrieve and set the context at the client side. Context information will be saved in ‘token_context.bin’ file


Step 5: Define Main method

Close the proxy and creat new proxy instance.
When we call the Subtract and Multiply operation, it will operate on the previously saved value (instance state).

End of the proxy 1, service instance saved in the database as shown below.
WCF DUrable service

Serialized XML instance state save in the database is shown below.
WCF Durable Service

Output of the client application.
WCF Durable Service

© 2015, admin. All rights reserved.

One thought on “Five steps to Test WCF Durable service

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

Leave a Reply

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