title: get ssl certificate in .net
body: <p>i am looking to get the data from any given domain names SSL certificate. For example I want to put in any website address e.g. "<a href="http://stackoverflow.com">http://stackoverflow.com</a>" and my code would firstly check if an SSL certificate exists. If it does then I want it to pull out the expiry date of the certificate. [ i am reading Domainnames from DB ]
  Example :<a href="http://www.digicert.com/help/" rel="noreferrer">http://www.digicert.com/help/</a></p>
  
  <p>i need to create a web service to check expiry date. how can i implement it?? - I have looked up loads of different things such as RequestCertificateValidationCallback and ClientCertificates etc.</p>
  
  <p>I could be completely wrong (hence why I need help) but would I create a HTTPWebRequest and then somehow request the client certificate and specific elements that way?</p>
  
  <p>i tried the example provided @<a href="https://stackoverflow.com/questions/2509854/ssl-certificate-pre-fetch-net">SSL certificate pre-fetch .NET</a> , but i am getting forbitten 403 error.</p>