Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
159 lines (144 sloc) 8.3 KB
<Type Name="ReceiveErrorHandling" FullName="System.ServiceModel.ReceiveErrorHandling">
<TypeSignature Language="C#" Value="public enum ReceiveErrorHandling" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed ReceiveErrorHandling extends System.Enum" />
<TypeSignature Language="DocId" Value="T:System.ServiceModel.ReceiveErrorHandling" />
<TypeSignature Language="VB.NET" Value="Public Enum ReceiveErrorHandling" />
<TypeSignature Language="C++ CLI" Value="public enum class ReceiveErrorHandling" />
<TypeSignature Language="F#" Value="type ReceiveErrorHandling = " />
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Enum</BaseTypeName>
</Base>
<Docs>
<summary>An enumeration that specifies handling for a poison message.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A poison message is a message that fails repeated attempts to deliver to the application. This is applicable only when using a Message Queuing (MSMQ)-based binding. The default value is `Fault`, which faults the listener and therefore the ServiceHost. In the case where the service was to fault because of a poison message, a <xref:System.ServiceModel.MsmqPoisonMessageException> is thrown. The exception contains the `LookupId` of the MSMQ message that can be used to move the message out of the way using System.Messaging API. Certain values of the <xref:System.ServiceModel.ReceiveErrorHandling> enumeration such as `Reject` and `Move` are only available on [!INCLUDE[wv](~/includes/wv-md.md)]. You control poison message handling by setting the <xref:System.ServiceModel.Channels.MsmqBindingElementBase.ReceiveErrorHandling%2A> property to one of the values of this enumeration.
## Examples
The following configuration code illustrates how to set this property in the service configuration file:
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/wcf/feature-details/poison-message-handling.md">Poison Message Handling</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.5/ms751472(v=vs.90)">Poison Message Handling in MSMQ 3.0</related>
</Docs>
<Members>
<Member MemberName="Drop">
<MemberSignature Language="C#" Value="Drop" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ServiceModel.ReceiveErrorHandling Drop = int32(1)" />
<MemberSignature Language="DocId" Value="F:System.ServiceModel.ReceiveErrorHandling.Drop" />
<MemberSignature Language="VB.NET" Value="Drop" />
<MemberSignature Language="C++ CLI" Value="Drop" />
<MemberSignature Language="F#" Value="Drop = 1" Usage="System.ServiceModel.ReceiveErrorHandling.Drop" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.ReceiveErrorHandling</ReturnType>
</ReturnValue>
<MemberValue>1</MemberValue>
<Docs>
<summary>This option drops the poison message. The message never gets delivered to the application. If the message's TTL had already expired at this point, then the message may appear in the sender's Dead Letter Queue. If not, the message does not appear anywhere. This option indicates that the user does not really care if the message is lost.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applicable platforms: [!INCLUDE[wxp](~/includes/wxp-md.md)], [!INCLUDE[ws2003](~/includes/ws2003-md.md)], and [!INCLUDE[wv](~/includes/wv-md.md)].
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Fault">
<MemberSignature Language="C#" Value="Fault" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ServiceModel.ReceiveErrorHandling Fault = int32(0)" />
<MemberSignature Language="DocId" Value="F:System.ServiceModel.ReceiveErrorHandling.Fault" />
<MemberSignature Language="VB.NET" Value="Fault" />
<MemberSignature Language="C++ CLI" Value="Fault" />
<MemberSignature Language="F#" Value="Fault = 0" Usage="System.ServiceModel.ReceiveErrorHandling.Fault" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.ReceiveErrorHandling</ReturnType>
</ReturnValue>
<MemberValue>0</MemberValue>
<Docs>
<summary>This option sends a fault to the listener that caused the ServiceHost to fault. The message must be removed from the application queue by some external mechanism before the application can continue to process messages from the queue.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applicable platforms: Windows XP, Windows Server 2003, and Windows Vista.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Move">
<MemberSignature Language="C#" Value="Move" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ServiceModel.ReceiveErrorHandling Move = int32(3)" />
<MemberSignature Language="DocId" Value="F:System.ServiceModel.ReceiveErrorHandling.Move" />
<MemberSignature Language="VB.NET" Value="Move" />
<MemberSignature Language="C++ CLI" Value="Move" />
<MemberSignature Language="F#" Value="Move = 3" Usage="System.ServiceModel.ReceiveErrorHandling.Move" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.ReceiveErrorHandling</ReturnType>
</ReturnValue>
<MemberValue>3</MemberValue>
<Docs>
<summary>This moves the poison message to a Poison Message Queue for later processing by a poison message handling application.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applicable platforms: [!INCLUDE[wv](~/includes/wv-md.md)] only.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Reject">
<MemberSignature Language="C#" Value="Reject" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ServiceModel.ReceiveErrorHandling Reject = int32(2)" />
<MemberSignature Language="DocId" Value="F:System.ServiceModel.ReceiveErrorHandling.Reject" />
<MemberSignature Language="VB.NET" Value="Reject" />
<MemberSignature Language="C++ CLI" Value="Reject" />
<MemberSignature Language="F#" Value="Reject = 2" Usage="System.ServiceModel.ReceiveErrorHandling.Reject" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.ReceiveErrorHandling</ReturnType>
</ReturnValue>
<MemberValue>2</MemberValue>
<Docs>
<summary>This instructs MSMQ to send a negative acknowledgement back to the sending queue manager that the message cannot be received by the application. The message is placed in the sending queue manager's Dead Letter Queue.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applicable platforms: [!INCLUDE[wv](~/includes/wv-md.md)] only.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.