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)

'Declaration
Public ReadOnly Property ClientCertificate As X509Certificate
'Usage
Dim instance As ServicePoint 
Dim value As X509Certificate 

value = instance.ClientCertificate

Property Value

Type: System.Security.Cryptography.X509Certificates.X509Certificate
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 Is Nothing Then
    Console.WriteLine("Certificate = (null)")
Else
    Console.WriteLine(("Certificate = " + sp.Certificate.ToString()))
End If 

If sp.ClientCertificate Is Nothing Then
    Console.WriteLine("ClientCertificate = (null)")
Else
    Console.WriteLine(("ClientCertificate = " + sp.ClientCertificate.ToString()))
End If

Console.WriteLine("ProtocolVersion = " + sp.ProtocolVersion.ToString())
Console.WriteLine(("SupportsPipelining = " + sp.SupportsPipelining.ToString()))
if (sp->Certificate == 0)
    Console::WriteLine(S"Certificate = (null)");
else
    Console::WriteLine(S"Certificate = {0}", sp->Certificate);

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

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

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

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft