WCF service returns "Cannot find the X.509 certificate" error

Discussion in 'ASP.NET / ASP.NET Core' started by wisemx, May 28, 2008.

  1. 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
     
  2. 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
     
  3. 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
     
  4. FWIW, I had the same problem. As an alternate means of getting secure transport, I implemented SSL with Windows authentication as follows:

     

Share This Page