Re: Using digital certificates when calling web services

From: Rob Vretenar (rob.vretenar_at_imason.com)
Date: 11/22/04


Date: 22 Nov 2004 08:45:28 -0800

If you want to load the certificate from the file, look at the
X509Certificate class in .Net:
System.Securtiy.Cryptograpy.X509Certificates.X509Certificate

You can load the cert from the file provided:

// The path to the certificate.
string Certificate = "filepath\VgeDev.p7b";

// Load the certificate into an X509Certificate object.
X509Certificate cert =
X509Certificate.CreateFromCertFile(Certificate);

once you have the cert, you can add it to the web service

if (cert != null)
{
webService.ClientCertificates.Add(cert);
}

You can also look at Microsoft's Web Service Enhancements (WSE) 2.0 for
additional information about security.

Rob Vretenar [imason inc.]



Relevant Pages

  • Question about using pre-signed certificates
    ... The owner of the web service asked for a certificate request ... He provided the certificate and I imported it into my Local ... After fixing the issue (was proxy server related), ... I would guess a problem with the cert, ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: certificate based web call fails under iis (urgent!)
    ... in order to get this to work (summary: Certificate based security ... calling web service from within a web service - only broken under IIS ... install cert in local machine certificate store ... IIS *please contact me*!! ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: [WSE 3.0] I need some pointers for using security
    ... After some certificate exporting/importing and fiddling with the ... If I can use only one cert, is there any way to distribute and install ... Do a search for 'Web Service Security Patterns and Practices' on MS website. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Using ldap with x.509, why?
    ... >> Currently we have one web service, with only one user, in which the ... >> We are looking at supporting perhaps 10 clients. ... >> Could someone please explain the advantage of putting the certificate ... > With a central repository cert management is easier. ...
    (comp.security.misc)
  • Re: Using ldap with x.509, why?
    ... > Currently we have one web service, with only one user, in which the ... > We are looking at supporting perhaps 10 clients. ... > Could someone please explain the advantage of putting the certificate ... With a central repository cert management is easier. ...
    (comp.security.misc)