Export (0) Print
Expand All

ServicePoint.ClientCertificate Property

Gets the last client certificate sent to the server.

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

public:
property X509Certificate^ ClientCertificate {
	X509Certificate^ get ();
}
/** @property */
public X509Certificate get_ClientCertificate ()

public function get ClientCertificate () : X509Certificate

Not applicable.

Property Value

An X509Certificate object that contains the public values of the last client certificate sent to the server.

The following code example displays the value of this property.

if ( sp->Certificate == nullptr )
   Console::WriteLine( "Certificate = (null)" );
else
   Console::WriteLine( "Certificate = {0}", sp->Certificate );

if ( sp->ClientCertificate == nullptr )
   Console::WriteLine( "Client Certificate = (null)" );
else
   Console::WriteLine( "Client Certificate = {0}", sp->ClientCertificate );

Console::WriteLine( "ProtocolVersion = {0}", sp->ProtocolVersion->ToString() );
Console::WriteLine( "SupportsPipelining = {0}", sp->SupportsPipelining );


if (sp.get_Certificate() == null) {
    Console.WriteLine("Certificate = (null)");
}
else {
    Console.WriteLine(("Certificate = " 
        + sp.get_Certificate().ToString()));
}

if (sp.get_ClientCertificate() == null) {
    Console.WriteLine("ClientCertificate = (null)");
}
else {
    Console.WriteLine(("ClientCertificate = " 
        + sp.get_ClientCertificate().ToString()));
}
Console.WriteLine(("ProtocolVersion = " 
    + sp.get_ProtocolVersion().ToString()));
Console.WriteLine(("SupportsPipelining = " 
    + sp.get_SupportsPipelining()));

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft