HTTP status 403: Forbidden


  • Hi all,

    I'm trying to access a web service that requires a client certificate.  The web service provider has provided me with the client certificate (which was automatically downloaded to my machine when I followed a link they e-mailed me).  When I run mmc.exe, the certficiate shows up under Certificates - Current User / Personal / Certificates.  

    However, when I try to request information from the web service through an ASP.NET page, it throws aa HTTP status 403: Forbidden exception.  Here's what my code looks like:

    Dim oWebService As New MyWebServiceWrapper()
    oWebService.Url = ...

    Dim oCertificate As X509Certificate = X509Certificate.CreateFromCertFile("cert.cer")
    Return oWebService.PerformWebService()

    The MyWebService class is simply a web reference to a .asmx stub I generated from a .wsdl file.  The "cert.cer" file was generated through Internet Explorer by exporting the client certificate.  Any ideas on why this isn't working?
    Wednesday, October 18, 2006 9:31 PM