MessagePropertyFilter.UseAuthentication Egenskap

Definition

Hämtar eller anger ett värde som anger om du vill hämta UseAuthentication egenskapsinformation när du tar emot eller granskar ett meddelande.

public:
 property bool UseAuthentication { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgUseAuthentication")]
public bool UseAuthentication { get; set; }
[<System.Messaging.MessagingDescription("MsgUseAuthentication")>]
member this.UseAuthentication : bool with get, set
Public Property UseAuthentication As Boolean

Egenskapsvärde

true för att ta emot UseAuthentication information, falseannars . Standardvärdet är false.

Attribut

Exempel

Följande kodexempel visar hur egenskapen används UseAuthentication .

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's UseAuthentication property.
queue->MessageReadPropertyFilter->
    UseAuthentication = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's 
// UseAuthentication property.
Console::WriteLine("Message.UseAuthentication: {0}", 
    orderMessage->UseAuthentication);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's UseAuthentication property.
queue.MessageReadPropertyFilter.UseAuthentication = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

// Display the value of the message's UseAuthentication property.
Console.WriteLine("Message.UseAuthentication: {0}",
    orderMessage.UseAuthentication);

Kommentarer

Egenskapen UseAuthentication för Message klassen anger om meddelandet måste autentiseras.

Det går inte att titta på egenskaperna för ett meddelande och avgöra om ett meddelande misslyckades med autentiseringen. Meddelanden som misslyckas med autentisering ignoreras och levereras inte till kön.

Gäller för

Se även