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( L"IsAuthenticated: {0}", stream->IsAuthenticated );
Console::WriteLine( L"IsMutuallyAuthenticated: {0}", stream->IsMutuallyAuthenticated );
Console::WriteLine( L"IsEncrypted: {0}", stream->IsEncrypted );
Console::WriteLine( L"IsSigned: {0}", stream->IsSigned );
Console::WriteLine( L"ImpersonationLevel: {0}", stream->ImpersonationLevel );
Console::WriteLine( L"IsServer: {0}", stream->IsServer );
}
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 不支援相互驗證。