Message.UseAuthentication 屬性

定義

取得或設定值,指出訊息在傳送之前是否已經 (或必須) 驗證。

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

屬性值

如果傳送的應用程式要求訊息的驗證則為 true,否則為 false

屬性

例外狀況

篩選訊息佇列以忽略 UseAuthentication 屬性。

備註

屬性 UseAuthentication 會指定訊息是否需要經過驗證。 如果傳送的應用程式要求驗證,訊息佇列會建立數位簽章,並在傳送訊息時使用它來簽署訊息,並在收到訊息時進行驗證。

如果 是 UseAuthenticationfalse 且訊息傳送至只接受已驗證訊息的佇列,當訊息到達佇列時將會遭到拒絕。

您無法藉由查看訊息的屬性來判斷訊息是否失敗。 訊息佇列會在訊息傳遞至佇列之前捨棄這類訊息。 不過,如果傳遞失敗導致訊息無法抵達佇列,您可以要求傳送通知訊息。

適用於

另請參閱