title: Redirect to HTTPS only if a certificate is installed
body: <p>Is there a way, in ASP.NET WebForms, to perform an always try redirect from HTTP to HTTPS? So, if the installation has a valid certificate installed, requests to HTTP URLs will always redirect to HTTPS. However, if the installation does not have a certificate installed, do not redirect and allow access over HTTP.</p>
  
  <p>What we are trying to avoid is having to adjust an install-specific Boolean option saying whether or not each installation has a valid TLS certificate installed or not. We'd also like to do this in .NET rather than in IIS if possible. This application is hosted by users on a variety of environments, and we are trying to avoid them needing to do any custom configuration to enable this redirect themselves.</p>