I'm trying to host WCF service in IIS7. Everything worked fine until I've specified the following in web.config file:
<serviceCredentials>
<serviceCertificate findValue="MyCert"
storeLocation="CurrentUser"
storeName="My"
x509FindType="FindBySubjectName" />
</serviceCredentials>
Then I get an exception System.InvalidOperationException: Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindBySubjectName', FindValue ‘MyCert’.
BTW - I'm using this same certificate ( stored at the same location ) with self-hosting WCF service without any problems.