Message.UseAuthentication 属性

定义

获取或设置一个值,该值指示消息发送前是否验证了(或是否必须验证)。Gets or sets a value that indicates whether the message was (or must be) authenticated before being sent.

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

属性值

Boolean

如果发送应用程序请求对消息进行验证,则为 true;否则为 falsetrue if the sending application requested authentication for the message; otherwise, false.

属性

例外

消息队列经过筛选后忽略了 UseAuthentication 属性。The message queue is filtered to ignore the UseAuthentication property.

注解

UseAuthentication属性指定是否需要对消息进行身份验证。The UseAuthentication property specifies whether the message needs to be authenticated. 如果发送应用程序请求身份验证,则消息队列会创建数字签名,并使用它在发送消息时对消息进行签名,并在收到消息时对消息进行身份验证。If the sending application requests authentication, Message Queuing creates a digital signature and uses it to sign the message when it is sent and authenticate the message when it is received.

如果 UseAuthenticationfalse 并且向只接受经过身份验证的消息的队列发送消息,则在消息到达队列时将拒绝该消息。If UseAuthentication is false and a message is sent to a queue that accepts only authenticated messages, the message will be rejected when it reaches the queue.

通过查看消息的属性,不能确定消息是否失败。You cannot determine if a message failed authentication by looking at its properties. 消息队列在传递到队列之前会丢弃此类消息。Message Queuing discards such messages before they are delivered to the queue. 但是,如果传递失败阻止消息到达队列,则可以请求发送确认消息。However, you can request that an acknowledgment message be sent if a delivery failure prevents a message from arriving in the queue.

适用于

另请参阅