View Full Version : WCF service returns "Cannot find the X.509 certificate" error
wisemx
05-28-2008, 12:09 AM
Hi,
Did you follow these steps?
Activating SSL for your account
http://kb.discountasp.net/article.aspx?id=10481
Salute,
Mark
SkySoftNet0
05-28-2008, 01:05 AM
Hi there,
I got SSL certificate installed on my sky-soft.net domain.
I deployed WCF Service at the following address: http://sky-soft.net/SkySoft/Authentication/Authentication.svc
When I try to reach service with IE then service returns me the following error: "Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectDistinguishedName', FindValue 'CN=sky-soft.net'".
Here is a reply from discountasp.net support team:
"Your SSL certificate's common name is "sky-soft.net". It is located in the LocalMachine My keystore. Perhaps there's a problem with the type of search you are doing. I recommend posting this in our community forum at http://community.discountasp.net. Our developers can help you troubleshoot there."
Does anyone know howto solve this problem?
Thank you
Vitaly
Aristotle
05-28-2008, 04:02 AM
FindBySubjectDistinguishedName might be a too specific search, and you might have to enter the entire subject line. I pulled up your SSL cert by going to https://sky-soft.net to see the details of the cert. Try either FindBySubjectName orFindByThumbprint.
With FindBySubjectName, try 'CN=sky-soft.net'
With FindByThumbprint, try 'f5 61 fb 92 1e dd bb 89 8f cf f5 1e cd c9 f9 3a 2b a1 c5 93'
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
SkySoftNet0
05-28-2008, 06:19 AM
Thank you, Aristotle
I modified my code according toyour suggestion and my WCF service found sky-soft.net sertificate but returned another error: The certificate 'CN=sky-soft.net, OU=Domain Control Validated - RapidSSL(R), OU=See www.rapidssl.com/resources/cps (c)08, OU=GT57369466, O=sky-soft.net, C=CA' must have a private key that is capable of key exchange. The process must have access rights for the private key.
I contacted discountasp.net support team and got their reply: We have now added read permissions for your site's ASPNET user on the private key file.
As a resultnow Ican see my service in IE: http://sky-soft.net/SkySoft/Authentication/Authentication.svc
Best Regards
Vitaly Laskarzhevsky
FlyTheBlueSky
05-28-2008, 08:18 AM
FWIW, I had the same problem. As an alternate means of getting secure transport, I implemented SSL with Windows authentication as follows:
[quote]
<system.serviceModel>
<services>
<!--productionWCFservice-->
<servicebehaviorConfiguration='MyServiceBehavior'na me='www.SomeSiteName.com.wcf.QBService'>
<endpointbinding='wsHttpBinding'bindingConfiguratio n='MessageSecurity'
contract='www.SomeSiteName.com.wcf.IQBService'/>
<endpointaddress='mex'binding='mexHttpsBinding'name ='MetadataBinding'
contract='IMetadataExchange'/>
</service>
</services>
[b]
<serviceBehaviors>
[b]
<serviceDebugincludeExceptionDetailInFaults='true'/>
<serviceMetadatahttpsGetEnabled='true'/>
<serviceTimeouts/>
</behavior>
</serviceBehaviors>
</behaviors>
[b]
<wsHttpBinding>
[b]
<securitymode='TransportWithMessageCredential'>
<messageclientCredentialType='Windows'/>
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
</CODE>
vBulletin® ©Jelsoft Enterprises Ltd.