Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Sending and Handling Faults

.NET Framework 4.6 and 4.5

This sample demonstrates how to use the SendReply and ReceiveReply messaging activities to send and receive expected and unexpected faults. In this scenario, the first client request results in an expected fault that has been included in its KnownTypes collection. The next few client requests result in receiving unexpected faults, before the final request succeeds.

To use this sample

  1. Open Visual Studio 2010 with elevated permissions, by right-clicking the Visual Studio 2010 icon and selecting Run as administrator.

  2. Open the Faults.sln solution file.

  3. To build the solution, press CTRL+SHIFT+B.

  4. Run the service project.

    1. In Solution Explorer, right-click the FaultService project and select Set as StartUp Project.

    2. Press CTRL+F5.

  5. Open another copy of Visual Studio 2010 with elevated permissions, by right-clicking the Visual Studio 2010 icon and selecting Run as administrator.

  6. Open the Faults.sln solution file.

  7. Run the client project.

    1. In Solution Explorer, right-click the FaultClient project and select Set as StartUp Project.

    2. Press CTRL+F5.

Important Note:
The samples may already be installed on your machine. Check for the following (default) directory before continuing.

<InstallDrive>:\WF_WCF_Samples

If this directory does not exist, go to Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4 to download all Windows Communication Foundation (WCF) and WF samples. This sample is located in the following directory.

<InstallDrive>:\WF_WCF_Samples\WF\Basic\Services\Faults




Build Date:

2012-08-02
Show:
© 2015 Microsoft