NetTcpSecurity.Mode 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定端點是否使用 NetTcpBinding訊息層級安全與傳輸層級安全性。
public:
property System::ServiceModel::SecurityMode Mode { System::ServiceModel::SecurityMode get(); void set(System::ServiceModel::SecurityMode value); };
public System.ServiceModel.SecurityMode Mode { get; set; }
member this.Mode : System.ServiceModel.SecurityMode with get, set
Public Property Mode As SecurityMode
屬性值
該值 SecurityMode 表示端點使用的是訊息層級安全還是傳輸層級安全。 預設值為 Transport。
例外狀況
價值尚未定義。
範例
NetTcpSecurity security = binding.Security;
Console.WriteLine("\tSecurity Mode: {0}", security.Mode);
備註
安全模式決定了端點所需的安全類型。 Windows Communication Foundation(WCF)安全性提供多種機制,以保護已設定為系統提供綁定的訊息傳輸。 每個綁定都支援這些安全模式的子集。 此模式決定了訊息傳輸安全功能(完整性、機密性與認證)所需的機制。