Determining if a Connection is Using SSL

Due to the way our hosting system handles SSL connections (dedicated SSL hardware), the underlying IIS server will not detect a secure connection through the normal means (Request.ServerVarialbles or Request.IsSecureConnection).

To determine if a connection is secure, test for the following server variable in the Request object:

Request.ServerVariables(“HTTP_CLUSTER_HTTPS”)

If this is present, the connection is secure. If it is not present, it will not be present in the collection. The value of this if present will be "on".

  • 1 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Related Articles

Client IP from Request.ServerVariables("REMOTE_ADDR") is Always the Same

If your scripts use Request.ServerVariables("REMOTE_ADDR") to get the client's IP...

Creating Virtual Directories for .Net Application Roots

By default, the root of your site is already configured as a .Net application root. If you need...

How do I add impersonation to my ASP.NET site?

Adding impersonation allows the web server process to run as your primary FTP user. This means...

Reloading an ASP.NET Application

Due to the load balanced environment we host your site under, IIS isn't currently able to detect...