Partager via


MSMQMessage.IsAuthenticated

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The IsAuthenticated property of the MSMQMessage object indicates whether the message was authenticated at the request of the sending application.

This property is superseded by MSMQMessage.IsAuthenticated2 in MSMQ 3.0.

Data type: Short
Run-time access: Read-only
Property IsAuthenticated As Short  

Parts

messageObject

Message (MSMQMessage) object that defines the message.

Property Value

A Short set to one of the following values:

1

The sending application requested authentication. The destination queue manager authenticated the message when it accepted the message.

0

The sending application did not request authentication. The destination queue manager did not attempt to authenticate the message when it accepted the message.

Remarks

This message property is used by the receiving application only when trying to determine if authentication was requested. If authentication was requested and the message is in the queue, then the message was authenticated.

Note

It is not possible to look at the properties of a message and determine if a message failed authentication. Messages that fail authentication are discarded and are not delivered to the queue.

MSMQ 2.0 can use two different types of digital signatures to authenticate messages: MSMQ 1.0 signatures and MSMQ 2.0 signatures. A destination computer running MSMQ 1.0 accepts only MSMQ 1.0 signatures. By default, a computer running MSMQ 2.0 will accept messages signed with either type of signature. The following registry entry specifies what type of signature is accepted by the destination computer:

HKLM\SOFTWARE\Microsoft\MSMQ\Parameters\Security\RcvOnlyEnhMsgAuthn  

To change the default behavior, set this entry to one of the following values.

To Set the registry entry to
Accept either MSMQ 1.0 or MSMQ 2.0 signatures. 0
Accept only MSMQ 2.0 signatures 1

By default, a source computer running MSMQ 2.0 uses only the MSMQ 1.0 signature to sign messages. Therefore, for compatibility, when you set this receiving registry entry to accept only MSMQ 2.0 signatures, make sure that you reset the applicable registry entry on the source computer as well. For more information, see Digital Signature Registry Entries and MSMQMessage.AuthLevel.

If the receiving application needs only to check whether authentication was requested, it should use IsAuthenticated. However, if the receiving application also needs to check what type of signature was used during authentication, it must use MSMQMessage.ReceivedAuthenticationLevel. You cannot specify both message properties when reading the messages in the queue.

Equivalent API Function Property

With API function calls, the equivalent property is PROPID_M_AUTHENTICATED.

Requirements

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib

See Also

MSMQMessage
MSMQMessage.ReceivedAuthenticationLevel
PROPID_M_AUTHENTICATED