Share via


ExceptionShieldingAttribute Class

Indicates that an implementation service class will use exception shielding.

Namespace: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF
Assembly: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF (in Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.dll) Version: 6.0.0.0 (6.0.1304.0)

Syntax

public class ExceptionShieldingAttribute : Attribute, 
    IServiceBehavior, IContractBehavior, IErrorHandler
'Declaration
Public Class ExceptionShieldingAttribute
    Inherits Attribute
    Implements IServiceBehavior, IContractBehavior, IErrorHandler
public ref class ExceptionShieldingAttribute : public Attribute, 
    IServiceBehavior, IContractBehavior, IErrorHandler

Remarks

Add this attribute to your service implementation class or your service contract interface and configure your host configuration file to use the Enterprise Library Exception Handling Application Block adding the FaultContractExceptionHandler class to the exceptionHandlers collection and set your FaultContract type that maps to a particular exception.

Inheritance Hierarchy

System.Object
  System.Attribute
    Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.ExceptionShieldingAttribute

See Also

ExceptionShieldingAttribute Members

Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF Namespace