Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ServicePoint.ClientCertificate Property

Gets the last client certificate sent to the server.

[Visual Basic]
Public ReadOnly Property ClientCertificate As X509Certificate
[C#]
public X509Certificate ClientCertificate {get;}
[C++]
public: __property X509Certificate* get_ClientCertificate();
[JScript]
public function get ClientCertificate() : X509Certificate;

Property Value

An X509Certificate containing the public values of the last client certificate sent to the server.

Example

[Visual Basic, C#, C++] The following example displays the value of this property.

[Visual Basic] 
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()))

[C#] 
if (sp.Certificate == null)
    Console.WriteLine ("Certificate = (null)");
else
    Console.WriteLine ("Certificate = " + sp.Certificate.ToString ());

if (sp.ClientCertificate == null)
    Console.WriteLine ("ClientCertificate = (null)");
else
    Console. WriteLine ("ClientCertificate = " + sp.ClientCertificate.ToString ());

Console.WriteLine ("ProtocolVersion = " + sp.ProtocolVersion.ToString ());
Console.WriteLine ("SupportsPipelining = " + sp.SupportsPipelining);


[C++] 
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));

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ServicePoint Class | ServicePoint Members | System.Net Namespace

Show:
© 2015 Microsoft