Cannot find the X.509 Certificate using the following search criteria:

22,162

Solution 1

Check the other post about the tool that you asked about. Verify your "my" storage and check if the CN="HighBall". I guess your CN is not just "HighBall", probably it has a top level domain. I think it's easier to look for the certificate serial number, i think it's faster than for it's canonical name and error prone.

Regards,

Victor

Solution 2

Remember that ASP.NET runs as a different user. It may need to be assigned access to the certificate.

Share:
22,162
Adron
Author by

Adron

I'm a jovial, pro-test driven (sometimes test after) development software architect and coder. I generally am in the C# .NET world of ASP.NET, WF, WCF, Web Services, and the whole list of "key words". I love what I do and commonly add a very business oriented, get the job done, agile (sometimes eXtreme), and entrepreneurial effort to my work. I also like to mentor (or teach), write (re: blog), and even work on projects in addition to work related projects. I also do dozens of other things ranging from drifting (my 350Z), playing heavy metal, blues, or a bit of jazz (guitar), and somewhat I still exist as a game geek. I also travel a lot, the majority by train, like to explore new cities, and also love to discuss sustainable buildings, transit, transportation, and vehicles in general (airplanes, cars, or trains). I however never get to do any of these things as much as I'd like to, but I have a continual blast doing them when I can, and one day maybe I'll get that action pushed through congress to change the day to 32 hours instead of 24. Or maybe not.

Updated on March 06, 2020

Comments

  • Adron
    Adron about 4 years

    I get this message:

    Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectDistinguishedName', FindValue 'CN=HighBall'.

    My web.config setup looks like this;

    Authentication is set like...

    <authentication mode="Windows" />
    

    The bindings are set for wsHttpBinging

    and my Service behavior is set as such...

    <behavior name="HighBall.Services.ServiceVerificationBehavior">
      <serviceAuthorization principalPermissionMode="UseAspNetRoles"
            roleProviderName="HighBallRoleProvider" />
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceCredentials>
        <serviceCertificate findValue="CN=HighBall" />
        <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
            membershipProviderName="HighBallMembershipProvider" />
      </serviceCredentials>
    </behavior>
    

    I've tried to figure out a way to verify what, how, and where to certificate is stored but am not sure how to do this. If anyone has any ideas on this error message I'd greatly appreciate the assist.

  • Richard Nienaber
    Richard Nienaber about 15 years
    From my experience, only the user that installed the certificates into the store has rights to access them. ASP.NET then can't see the certificate when it tries to access it. You need to use a tool like winhttpcertcfg to give the ASP.NET user access.
  • ltiveron
    ltiveron over 7 years
    This was exactly my problem. I had to add certificate to Local Machine instead of Current user. link to solution: technet.microsoft.com/en-us/library/… under "Adding certificates to the Trusted Root Certification Authorities store for a local computer"