Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IsAuthenticated Property

SslStream.IsAuthenticated Property

Gets a Boolean value that indicates whether authentication was successful.

Namespace:  System.Net.Security
Assembly:  System (in System.dll)

public override bool IsAuthenticated { get; }

Property Value

Type: System.Boolean
true if successful authentication occurred; otherwise, false.

Clients authenticate by calling the AuthenticateAsClient or BeginAuthenticateAsClient methods. Servers authenticate by calling the AuthenticateAsServer or BeginAuthenticateAsServer methods.

The following code example demonstrates displaying the value of this property.

static void DisplaySecurityServices(SslStream stream)
{
   Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer);
   Console.WriteLine("IsSigned: {0}", stream.IsSigned);
   Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted);
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft