This returns no certificates when validOnly is set to True, as in the code sample. Switching to False returns the certificate. So two questions.
What determines a "valid" certificate? The cert is completely valid, shows as "This certificate is ok", the issuing authority cert is installed and available, the date range is fine, the server time is accurate, the intended usage is "all".
How can I re-install this certificate so that it is considered valid?
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection cc = store.Certificates.Find(X509FindType.FindBySubjectName, certName, true);
X509Certificate2Collection Find validOnly asp.net 2.0 Server 2003
Edit: I was not specific about this part: This is a web service certificate. I have installed the root certificate for the certificate authority in several places but it still does not work. I thought it had to be in Third-Party or Intermediate or Trusted
or something but nothing works.
CurtisVon
0 Points
1 Post
X509Certificate2Collection.Find() returns a cert only when validOnly = False
Aug 18, 2009 03:34 PM|LINK
This returns no certificates when validOnly is set to True, as in the code sample. Switching to False returns the certificate. So two questions.
What determines a "valid" certificate? The cert is completely valid, shows as "This certificate is ok", the issuing authority cert is installed and available, the date range is fine, the server time is accurate, the intended usage is "all".
How can I re-install this certificate so that it is considered valid?
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection cc = store.Certificates.Find(X509FindType.FindBySubjectName, certName, true);
http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificate2collection.find(VS.80).aspx
X509Certificate2Collection Find validOnly asp.net 2.0 Server 2003
Edit: I was not specific about this part: This is a web service certificate. I have installed the root certificate for the certificate authority in several places but it still does not work. I thought it had to be in Third-Party or Intermediate or Trusted or something but nothing works.