Home » Asp.netRSS

X509Certificate2Collection stop working

Hello

i have the falowing methos used on my website to capture client certificates that is instaled on the server and he works frequently well

 

        public X509Certificate2Collection ListarCertificados()
        {
            X509Certificate2 oX509Cert = new X509Certificate2();
            X509Store store = new X509Store(StoreLocation.CurrentUser);
            store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
            X509Certificate2Collection collection = (X509Certificate2Collection)store.Certificates;
            X509Certificate2Collection collection1 = (X509Certificate2Collection)collection.Find(X509FindType.FindByTimeValid, DateTime.Now, false);
            return (X509Certificate2Collection)collection.Find(X509FindType.FindByKeyUsage, X509KeyUsageFlags.DigitalSignature, false);
        }

 

The Problem is that for some times he works return the certificates but from a time to other he stop working and nothing return with no errors the only way to he become working again is to stop and start the Application Pool in IIS

Someone have and idea ???

Tanks
 

 

2 Answers Found

 

Answer 1

Hi,

NFT:
return with no errors
 

Then what is happened this time? Is there any symptoms?

May be you can have a look at these links:

http://schleichermann.wordpress.com/2010/02/16/x509certificates/

http://geekswithblogs.net/shahed/archive/2007/11/22/117056.aspx

Hope this can help you.

 

Answer 2

Hello

 

The method simple dont bring anything  

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter