'How to check certificate revocation status in c#?

The certificate should be revoked if exists in the revocation list. There is an option in .net by which you'll be able to check the certificate revocation. I need to explore my certificate in the revocation list and revoke it, it exists in the revocation list. Therefore, I use the below one-line code to do that:

ServicePointManager.CheckCertificateRevocationList = true;

The problem is that the above code does not work properly. I mean certificate revocation will never be checked. For example, If I revoke the certificate manually certificate is still working. Is there any help?



Solution 1:[1]

You can use X509Certificate2.Verify as described here:

X509Certificate2.Verify

You can load your certificate and verify it by calling the verify method.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shay Vaturi