Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Message.SenderId Property

Gets the identifier of the sending user.

Namespace:  System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)
[MessagingDescriptionAttribute("MsgSenderId")]
public byte[] SenderId { get; }

Property Value

Type: System.Byte[]
An array of byte values that identifies the sender. The receiving Queue Manager uses the identifier when it authenticates the message to verify the sender of the message and the sender's access rights to the queue.
ExceptionCondition
InvalidOperationException

The message has not been sent. This property can only be read on messages retrieved from a queue.

-or-

The message queue is filtered to ignore the SenderId property.

If the AttachSenderId property is false, the sender identifier specified in the SenderId property is not attached to the message when it is sent. This indicates to Message Queuing that the sender should not be validated when it sends the message to the destination queue. If the AttachSenderId property is true, the SenderId property value is trustworthy only if the message was authenticated. Use the Authenticated property in conjunction with the SenderId property to verify the sender's access rights.

A connector application is an application that uses a connector server to provide communication between Message Queuing and other queuing systems. Message Queuing requires connector applications to provide sender identification. You must set the ConnectorType property when sending a message through a connector application.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.