1
votes

I am developing a WCF service on my local computer using Visual Studios built in ASP.NET development sever and I'm having issues creating and using temporary Certificates.

I have created a cert call TempCA and added it to the Trusted Root Certificate folder and I have created another called SignedByCA which has been added to the personal folder.

The service config file has been set up to use SignedByCA but when I run the service I get the following error.

The certificate 'CN=SignedByCA' must have a private key that is capable of key exchange. The process must have access rights for the private key.

I have tried using WinHttpCertCfg.exe to give other users access to the key but I have since found out that WinHttpCertCfg.exe has be deprecated in windows Vista.

Has anyone had this issue before in a similar circumstance??

1

1 Answers

0
votes

Try certmgr. But I suppose you used the makecert to generate the certificate, you don't need to use WinHttpCertCfg to install it. It should be installed automatically.

Also, if you are hosting the service in IIS, the private key is normally generated in

C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

You can try granting read-only security of the MachineKeys for the user "NETWORK SERVICE" (user for IIS6).