Handling Exceptions in an HPC Session

In a distributed model, the client often cannot receive exceptions that occur in the service. However, HPC sessions do provide exception propagation, making it possible for service faults to be caught and processed by the client application.

To enable exception propagation, include the following attribute on the class declaration that implements the service.

[ServiceBehavior(IncludeExceptionDetailInFaults = true)]

For example,

    [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
    public class EchoService : IEchoService
        . . .