views:

92

answers:

2

I am building a WCF service as in this article and facing trouble with X.509 certificate.

When I debug, everything is OK. When I publish and run the application, I receive the error:

Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindBySubjectName', FindValue 'WCFServer'.

What troubleshooting steps can I take?

The server is IIS 5.1 on Windows XP SP3

A: 

When you publish your service is it running on the same development machine? If not make sure you install the cert in the store on the machine you are publishing to.

Tone
+1  A: 

At a guess: it seems to be looking in the "CurrentUser" store, which is tied to your user account. Your IIS instance might not be running under that user account, in which case it won't find the cert. You'd need to use the global store, or to install the cert under your IIS service user's account to fix the problem.

Dan Puzey