This documentation is archived and is not being maintained.

FaultBinding Class

Specifies the format for any error messages that might be output as a result of the operation. This class cannot be inherited.

Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in

public ref class FaultBinding sealed : public MessageBinding
public final class FaultBinding extends MessageBinding
public final class FaultBinding extends MessageBinding
Not applicable.

The FaultBinding class corresponds to the Web Services Description Language (WSDL) <fault> element enclosed by the <operation> element, which in turn corresponds to the OperationBinding class. For more information about WSDL, see the specification at

The following example demonstrates a typical use of the FaultBinding class.

FaultBindingCollection^ myFaultBindingCollection = myOperationBinding->Faults;
FaultBinding^ myFaultBinding = gcnew FaultBinding;
myFaultBinding->Name = "ErrorString";
// Associate SOAP fault binding to the fault binding of the operation.
myExtensions = myFaultBinding->Extensions;
SoapFaultBinding^ mySoapFaultBinding = gcnew SoapFaultBinding;
mySoapFaultBinding->Use = SoapBindingUse::Literal;
mySoapFaultBinding->Namespace = "";
myExtensions->Add( mySoapFaultBinding );
myFaultBindingCollection->Add( myFaultBinding );

FaultBindingCollection myFaultBindingCollection = 
FaultBinding myFaultBinding = new FaultBinding();

// Associate SOAP fault binding to the fault binding of the operation.
myExtensions = myFaultBinding.get_Extensions();
SoapFaultBinding mySoapFaultBinding = new SoapFaultBinding();


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0