MessagePropertyFilter.SenderCertificate Property

 

Gets or sets a value that indicates whether to retrieve Message.SenderCertificate property information when receiving or peeking a message.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

[MessagingDescriptionAttribute("MsgSenderCertificate")]
public bool SenderCertificate { get; set; }

Property Value

Type: System.Boolean

true to receive Message.SenderCertificate information; otherwise, false. The default is false.

The SenderCertificate property of the Message class specifies the security certificate used to authenticate messages.

The following code example demonstrates the use of the SenderCertificate property.

// Set the queue's MessageReadPropertyFilter property to enable the
// message's SenderCertificate property.
queue.MessageReadPropertyFilter.SenderCertificate = 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 SenderCertificate property.
Console.WriteLine("Message.SenderCertificate: {0}",
    orderMessage.SenderCertificate);

.NET Framework
Available since 1.1
Return to top
Show: