ServiceDebugElement.IncludeExceptionDetailInFaults Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets a value that specifies whether to include managed exception information in the detail of SOAP faults returned to the client for debugging purposes.

Namespace:   System.ServiceModel.Configuration
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

	DefaultValue = false)]
public bool IncludeExceptionDetailInFaults { get; set; }

Property Value

Type: System.Boolean

true if Windows Communication Foundation (WCF) returns managed exception information in the SOAP faults for client-side debugging purposes; otherwise, false. The default is false.

If you set the IncludeExceptionDetailInFaults property to true programmatically, you can enable the flow of managed exception information to the client for debugging purposes, as well as the publication of HTML information files for users browsing the service in Web browsers.


Returning managed exception information to services can be a security risk. This is because exception details expose information about the internal client implementation that could be used by unauthorized services.

.NET Framework
Available since 3.0
Return to top