NegotiateStream.IsMutuallyAuthenticated 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會得到 Boolean 一個值,表示伺服器和用戶端是否都已認證。
public:
virtual property bool IsMutuallyAuthenticated { bool get(); };
public override bool IsMutuallyAuthenticated { get; }
member this.IsMutuallyAuthenticated : bool
Public Overrides ReadOnly Property IsMutuallyAuthenticated As Boolean
屬性值
true如果伺服器已經被認證;否則,。 false
範例
以下程式碼範例展示了此屬性的值。
static void DisplayAuthenticationProperties(NegotiateStream stream)
{
Console.WriteLine("IsAuthenticated: {0}", stream.IsAuthenticated);
Console.WriteLine("IsMutuallyAuthenticated: {0}", stream.IsMutuallyAuthenticated);
Console.WriteLine("IsEncrypted: {0}", stream.IsEncrypted);
Console.WriteLine("IsSigned: {0}", stream.IsSigned);
Console.WriteLine("ImpersonationLevel: {0}", stream.ImpersonationLevel);
Console.WriteLine("IsServer: {0}", stream.IsServer);
}
備註
當客戶端需要伺服器提供認證憑證時,會指定互助認證。 預設情況下,客戶端會要求互相驗證。
協商協定根據客戶端與伺服器所支援的安全協定,選擇 NTLM 或 Kerberos。 NTLM 不支援互認證。