RE: 403: Forbidden when sending client certificate to remove web servi

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Issue Resolution:

This was a Verisign Class 1 Individual CA - G2.

The problem ended up being the chaining of the certificates.

On Windows Server 2003, when the certificate was imported into the local
machine store, the certificate and all of the intermediate and root
certificates were being pulled into the "Local" store.

Once I identified the intermediate certificate and moved it in the
Intermediate CA location, the process worked.



"Raphael Gray" wrote:

Summary:
I am accessing a remote web service as a client and passing a client
certificate as part of a call. The client certificate works perfectly when
checking via a local user account to access the data. It also works on my
local PC. On the Windows 2003 Server it is failing. I have tried several
options as outlined below to make this work.

Environment:
Windows Server 2003 SP3, .Net 2.0.50727, IIS 6.0

Application:
C# .Net web page. This is calling the WebService via a proxy and using the
WSE 3.0 classes to get the certificate.

Certificate:
The certificate is an X509 pfx that includes the private key and works fine
from a local user account.

Code Sample:
//Certificate Collection Location where certificate is gathered from
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine)

//Request
Proxy myProxy = new Proxy();
myProxy.ClientCertificates.Add(signatureToken.Certificate)
string myResult = myProxy.Execute(xmlString)



Error: I then receive a WebException as: The request failed with HTTP
status 403: Forbidden.


Setup/Attempted Solutions:
1. Ensured that the certificate includes the private key
(signatureToken.Certificate.HasPrivateKey).

2. Ensured that the Security needed should be the NT Authority\Network
Service Account.

3. Ensured that the Certificate was in the Local Machine Store Personal
Certificates Repository. (using MMC - Certificates Add-In - Ensured this
was added to the local machine store - Personal Folder).

4. Used WinHttpCertCfg.exe to ensure that needed accounts should have
authority to the certificate: ("C:\Program Files\Windows Resource
Kits\Tools\WinHttpCertCfg.exe" -g -c LOCAL_MACHINE\MY -s "CertName" -a
"Server\NETWORK SERVICE") (Confirmation using -l method: Additional
accounts and groups with access to the private key include:
BUILTIN\Administrators
NT AUTHORITY\SYSTEM
NT AUTHORITY\NETWORK SERVICE)
I also have tried adding the ASPNet and IUSR_MACHINE securities for this.


This seems to have followed all the instructions I have seen and I have
combed the posts for several hours looking for a resolution. Sorry about the
glut of info, but I wanted to ensure that steps already taken were known.
I'm sorry about any posting etiquette issues as well as I post very
infrequently.

Thanks
.



Relevant Pages

  • 403: Forbidden when sending client certificate to remove web servi
    ... I am accessing a remote web service as a client and passing a client ... certificate as part of a call. ... checking via a local user account to access the data. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Page Cannot Be Displayed and Certificates
    ... A user is trying to get to a site that requires a certificate. ... Tried the site under a different local account and works fine. ... Reset all the settings I could find in Internet Options back to the ... reinstallation of IE and/or her local user account? ...
    (microsoft.public.windowsxp.help_and_support)
  • EFS
    ... Would exporting the Domain Administrator's certificate ... and importing it to your local user account solve the ...
    (microsoft.public.win2000.security)
  • Re: What to do with certificates when profile is deleted/recreated?
    ... Best Practices for implementing Windows Server 2003 PKI: ... Troubleshooting Certificate Status and Revocation whitepaper: ... Windows Server 2003 web enrollment and troubleshooting guide: ... roaming user profiles ...
    (microsoft.public.windows.server.security)
  • Re: Isolation of the Root CA
    ... Windows Server 2003 web enrollment and troubleshooting guide: ... Best Practices for implementing Windows Server 2003 PKI: ... Troubleshooting Certificate Status and Revocation whitepaper: ... >>> standalone root CA and use it to issue a certificate for an Enterprise ...
    (microsoft.public.win2000.security)