"Cannot load the X.509 certificate identity specified in the configuration"

Merlin picture Merlin · Feb 9, 2009 · Viewed 14.3k times · Source

I transfered a workking WCF service from my development environment to the QA environment, including the certificates (Root Authority, Root Auth revocation list, Service certificate - including its PK).

Afterward I located the private key usihg 'FindPrivateKey' and gave all the relavent accounts full permissions to access the private key file at the file system level.

My app crashes with a Unhandled Exception: System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.

I am stumped, I think I covered everything, but obviously not...

I have tried this on a Windows Service Host as well as a Console App Host. Same issue.

Answer

hortman picture hortman · Oct 3, 2011

I ran into this same error in a simple WFC service written with VS2010 SP1 on Win 7. The fix that I found was to add

<dns value="localhost" />

to the <identity> section of app.config

Source: http://social.msdn.microsoft.com/Forums/en-AU/wcf/thread/439539ef-e8d7-4e7d-b36e-b80acd401606