NetMsmqSecurityMode 列舉


NetMsmqSecurityMode 列舉會指定 MSMQ 傳輸可使用的安全性模式。The NetMsmqSecurityMode enumeration specifies security modes that can be used by the MSMQ transport.

public enum class NetMsmqSecurityMode
public enum NetMsmqSecurityMode
type NetMsmqSecurityMode = 
Public Enum NetMsmqSecurityMode


Both 3

同時啟用 MSMQ 傳輸安全性與 SOAP 安全性。Enables both MSMQ transport security and SOAP security.

Message 2

啟用 SOAP 安全性。Enables SOAP security.

None 0

停用 MSMQ 傳輸安全性與 SOAP 安全性。Disables both MSMQ transport security and SOAP security.

Transport 1

啟用 MSMQ 傳輸安全性。Enables MSMQ transport security.


下列程式碼顯示如何指定 NetMsmqBinding 繫結的安全性模式。The following code shows how to specify the security mode for a NetMsmqBinding binding.

NetMsmqBinding binding = new NetMsmqBinding();
    NetMsmqSecurity security = binding.Security;


MSMQ 傳輸安全性可保護使用 MSMQ 的訊息。MSMQ transport security secures messages using MSMQ. SOAP 安全性可保護使用 WS-* 安全性協定的訊息。SOAP security secures messages using the WS-* security protocols. 此屬性決定傳輸安全性功能 (如完整性、機密性與驗證) 是由哪些機制取得。This property determines the mechanisms by which transfer security functions (such as integrity, confidentiality and authentication) are obtained.