Question

I have a server certificate working with my WCF service.

However when I run the webservice I seem to have a permissions problem.

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

Any idea?

Was it helpful?

Solution

Assuming you have the full public/private key pair you haven't granted access to the private key of the certificate to the process your WCF service is running under.

Now how you do this depends on your OS version and how you are hosting the service but this article provides instructions that should work in for XP and Windows 2003.

For Windows 2008/Vista/Win7 the process is slightly easier. Start MMC and add the Certificate Snap-in, selecting the right container owner for your SSL certificate. Find the certificate (it's probably in the personal store), right click on it and choose All Tasks > Manage Private key. Grant read access to the private key to the user hosting your service.

OTHER TIPS

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s mycert -a "Network Service"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top