I have a WebForms app on IIS7 with clients authenticating via certificates. Is there a way to read from client certificate (one on the server or the one that client supplies) to find out when it will expire? How can this be done?
I want to prevent user from seeing 403 when it expires and give them the new certificate on time.
I understand that this is something that certificate server should be doing but seriously, how many of works with certificate server attached to web server…
You can do so via the Request.ClientCertificate, which is an object of type HttpClientCertificate. Check out the VALIDFROM and VALIDUNTIL fields.