NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Message.DestinationSymmetricKey

Gets or sets the symmetric key used to encrypt messages.

[Visual Basic]
Overridable Public Property DestinationSymmetricKey As Byte ()
[C#]
public byte[] DestinationSymmetricKey {virtual get; virtual set;}
[C++]
public: __property virtual unsigned char* get_DestinationSymmetricKey();
public: __property virtual void set_DestinationSymmetricKey(unsigned char*[]);
[JScript]
public function get DestinationSymmetricKey() : Byte[];
public function set DestinationSymmetricKey(Byte[]);

Property Value

An array of type 8-bit unsigned integer which specifies the destination symmetric key used to encrypt the message. The default is a zero-length array.

Exceptions

Exception Type Condition
InvalidOperationException The message queue is filtered not to read the DestinationSymmetricKey property.
ArgumentException The DestinationSymmetricKey is a null reference (in Visual Basic Nothing).

Remarks

DestinationSymmetricKey provides access to the DestinationSymmetricKey property of the Message Queuing MSMQMessage object.

DestinationSymmetricKey must be set when you send application-encrypted messages, or when you send encrypted messages to a foreign queue. The symmetric key must be encrypted with the public key of the receiving queue manager before you set this property.

When you send application-encrypted messages, the receiving queue manager uses the symmetric key to decrypt the message before it is sent on to its destination queue.

Messages sent to a foreign queues are first received by the appropriate connector application. When the connector application receives the message, it forwards the encrypted message with the attached symmetric key to the receiving application. It is the responsibility of the receiving application to decrypt the symmetric key and the body of the message.

When sending messages, always set DestinationSymmetricKey and ConnectorType together. DestinationSymmetricKey is ignored if ConnectorType is not also set when the message is sent.

DestinationSymmetricKey has a maximum array size of 256.

Example

See Also

Message Class | Message Members | System.Messaging Namespace | ConnectorType | UseEncryption