Can I add another twist?
I am trying to implement WS-Security (Message level) with X.509 Certificates.
I am using a basicHttp receiving BizTalk port, with message level security, and Certificate client credential requirements. I created, with Makecert.exe using my own RootCA for testing, a service certificate and a client certificate.
I can never get the .SVC file, hosted in ISS, to run. I am getting the following error:
Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindByThumbprint', FindValue 'DFB6EBFEA3588BC68858A00DB39795FB63AE856F'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code
Stack Trace:
[InvalidOperationException: Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindByThumbprint', FindValue 'DFB6EBFEA3588BC68858A00DB39795FB63AE856F'.]
System.ServiceModel.Security.SecurityUtils.GetCertificateFromStoreCore(StoreName storeName, StoreLocation storeLocation, X509FindType findType, Object findValue, EndpointAddress target, Boolean throwIfMultipleOrNoMatch) +241
System.ServiceModel.Security.SecurityUtils.GetCertificateFromStore(StoreName storeName, StoreLocation storeLocation, X509FindType findType, Object findValue, EndpointAddress target) +34
System.ServiceModel.Security.X509CertificateRecipientServiceCredential.SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, Object findValue) +49
Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.SetServiceCertificate() +210
Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.InitializeRuntime() +871
Microsoft.BizTalk.Adapter.Wcf.Runtime.WebServiceHost`3.InitializeRuntime() +110
System.ServiceModel.ServiceHostBase.OnBeginOpen() +27
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +49
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +121
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479
I think I have installed the private key and public key for the service certificate properly and allowed the BizTalkUser and ASPNET user access to the private key.
Any Ideas?