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

浪尽此生 提交于 2019-11-28 05:09:48

问题


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.


回答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




回答2:


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




回答3:


Try to use Certificate Manager (with MMC) to see installed certificates. Instructions for XP: manage certificates for a computer, probably similar with Vista and 7 as well.

I was having problems with service unable to find the x509 certificate, but by using the Certificate Manager I found out that "Install PFX" command from Windows Explorer had not installed the certificate at all! This was fixed by importing the certificate from Certificate Manager.



来源:https://stackoverflow.com/questions/216109/cannot-find-the-x-509-certificate-using-the-following-search-criteria

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!