Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CallbackBehaviorAttribute::IncludeExceptionDetailInFaults Property

 

Gets or sets a value that specifies that general unhandled execution exceptions are to be converted into a FaultException<TDetail> of type String and sent as a fault message. Set this to true only during development to troubleshoot a service.

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

public:
property bool IncludeExceptionDetailInFaults {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true if unhandled exceptions are to be returned as SOAP faults; otherwise, false. The default is false.

Set IncludeExceptionDetailInFaults to true to enable exception information to flow back to services for debugging purposes when possible. This is a development-only feature and should not be employed in deployed services. These faults appear to the calling service as FaultException objects.

System_CAPS_importantImportant

Setting IncludeExceptionDetailInFaultsto true enables services to obtain information about internal client callback exceptions; it is only recommended as a way of temporarily debugging a duplex client application.

The following code example shows a CallbackBehaviorAttribute on a callback object that uses the SynchronizationContext object to determine which thread to marshal to, the ValidateMustUnderstand property to enforce message validation, and the IncludeExceptionDetailInFaults property to return exceptions as FaultException objects to the service for debugging purposes.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft