WCF server certificates Key not found, cannot find private key

I have a server certificate working with my WCF service.

However, when I start the web service, I seem to have a permission problem.

[ArgumentException: CN = S80 certificate must have a private key capable of key exchange. The process must have access rights for the private key.]

Any idea?

+6
certificate wcf
source share
2 answers

Assuming you have a full public / private key pair, you have not granted access to the private key of the certificate for the process in which your WCF service is running.

Now, how you do it depends on your OS version and how you host this service, but this article contains instructions that should work for XP and Windows 2003.

For Windows 2008 / Vista / Win7, the process is a bit easier. Launch the MMC and add the Certificate snap-in by selecting the container owner rights for your SSL certificate. Locate the certificate (probably in your personal store), right-click it and select All Tasks> Manage Private Key. Grant access to the private key to the user serving your service.

+18
source share
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s mycert -a "Network Service" 
+2
source share

All Articles