Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SslStream::IsServer Property

 

Gets a Boolean value that indicates whether the local side of the connection used by this SslStream was authenticated as the server.

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

public:
property bool IsServer {
	virtual bool get() override;
}

Property Value

Type: System::Boolean

true if the local endpoint was successfully authenticated as the server side of the authenticated connection; otherwise false.

If authentication failed or did not occur, this property returns false.

To authenticate as the server, call the AuthenticateAsServer or BeginAuthenticateAsServer methods.

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

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


.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft