MessageFault Class
Collapse the table of content
Expand the table of content

MessageFault Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Represents an in-memory representation of a SOAP fault that can be passed to CreateMessage to create a message that contains a fault.


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

public abstract class MessageFault

The MessageFault type exposes the following members.

Protected methodMessageFaultWhen called in a derived class, initializes a new instance of the MessageFault class.

Public propertyActorGets or sets the value of the actor.
Public propertyCodeGets the SOAP fault code.
Public propertyHasDetailGets a value that indicates whether the MessageFault has a detail object.
Public propertyNodeGets the SOAP node.
Public propertyReasonGets a textual description of a SOAP fault.

Public methodStatic memberCreateFaultReturns a new MessageFault object that uses the specified Message and the specified maximum buffer size for the message buffer.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetDetail<T>()Returns the detail object of the message fault.
Public methodGetDetail<T>(XmlObjectSerializer)Returns the detail object that uses the specified XmlObjectSerializer.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetReaderAtDetailContentsReturns an XmlDictionaryReader object that is positioned on the detail object of the MessageFault.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnGetReaderAtDetailContentsWhen called in a derived class, returns an XmlDictionaryReader object that is positioned on the detail object of the MessageFault.
Protected methodOnWriteDetailInvoked prior to writing the detail contents.
Protected methodOnWriteDetailContentsWhen overridden in a non-abstract derived class, writes the contents of the detail element.
Protected methodOnWriteStartDetailWrites the start element using the specified XmlDictionaryWriter and SOAP envelope version.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Use the MessageFault class any time you need an in-memory SOAP fault that can be modified and used to create a SOAP message that contains the fault information.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

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

© 2017 Microsoft