ExceptionShieldingAttribute Class

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Interface, Inherited := False,  _
    AllowMultiple := False)> _
PublicClassExceptionShieldingAttribute _
    Inherits Attribute _
    Implements IServiceBehavior, IContractBehavior, IErrorHandler
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, Inherited = false, 
    AllowMultiple = false)]
publicclassExceptionShieldingAttribute : Attribute, 
    IServiceBehavior, IContractBehavior, IErrorHandler
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Interface, Inherited = false, 
    AllowMultiple = false)]
publicref classExceptionShieldingAttribute : public Attribute, 
    IServiceBehavior, IContractBehavior, IErrorHandler
publicclass ExceptionShieldingAttribute extends Attribute implements 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

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.