Tuesday, September 30, 2008

Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectName'

I tried to hook up my portal with a WCF service but got error: Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation CurrentUser, FindType 'FindBySubjectName', FindValue.

The app pool of this portal uses NetworkService account. The cert is there in CurrentUser store. Why portal server cannot find this cert?

It is because NetworkService will not search cert in CurrentUser store. Current User is only my logon account. Since the portal can run without a user logon or with multple users logon, NetworkService may not know which "CurrentUser" account to search the cert.

Two solutions:

(1) Use a cert in LocalMachine then NetworkService is able to find it.

(2) Using my own logon account instead of the built-in accounts for the app pool also resolved the problem.

Possible solution:
You may use NetworkService account but create a CurrentUser cert store for NetworkService. To do this, in MMC, create a cert store for WWW service. Then NetworkService may consider this store as its "CurrentUser" store and seach certs in it. I have not tried this.

On 2/26/2009, I encountered the same issue. I did not find anything wrong by doing all verification. The cert is not expired, the permission is correct, cert chain is normal, etc. Finally, I had to delete and reinstall the cert. Then it worked. This means the cert store can cheat somehow.

8 comments:

Balaji said...
This comment has been removed by the author.
Unknown said...

Nicely written and great info. I really cannot thank you enough for sharing.
Salesforce Training | Online Course | Certification in chennai | Salesforce Training | Online Course | Certification in bangalore | Salesforce Training | Online Course | Certification in hyderabad | Salesforce Training | Online Course | Certification in pune

lavanya said...

Greetings. I know this is somewhat off-topic, but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform like yours, and I’m having difficulty finding one? Thanks a lot.


Java training in Chennai

Java training in Bangalore

Java training in Hyderabad

Java Training in Coimbatore

Java Online Training

jeni said...

I just loved your article on the beginners guide to starting a blog.If somebody take this blog article seriously in their life, he/she can earn his living by doing blogging.thank you for this article.

hardware and networking training in chennai

hardware and networking training in velachery

xamarin training in chennai

xamarin training in velachery

ios training in chennai

ios training in velachery

iot training in chennai

iot training in velachery

Jayalakshmi said...

Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
sap training in chennai

sap training in tambaram

azure training in chennai

azure training in tambaram

cyber security course in chennai

cyber security course in tambaram

ethical hacking course in chennai

ethical hacking course in tambaram

deiva said...

Nicely written and great info. I really cannot thank you enough for sharing.
web designing training in chennai

web designing training in omr

digital marketing training in chennai

digital marketing training in omr

rpa training in chennai

rpa training in omr

tally training in chennai

tally training in omr

shiny said...

Your info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..



oracle training in chennai

oracle training in annanagar

oracle dba training in chennai

oracle dba training in annanagar

ccna training in chennai

ccna training in annanagar

seo training in chennai

seo training in annanagar

praveen said...

First i got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks.
hardware and networking training in chennai

hardware and networking training in porur

xamarin training in chennai

xamarin training in porur

ios training in chennai

ios training in porur

iot training in chennai

iot training in porur