I am trying to force a page to be run under SSL, so I have implemented the following on page_load:
if (!Request.IsLocal && !Request.IsSecureConnection)
{
Response.Redirect(Helper.GetInstance().SSLBaseURL() + ScriptName());
}
For some reason this is ending up in a loop. Earlier today, I checked Request.Uri.Scheme, and it was resolving as "http", though I was clearly connected to https://www.domain.com/pagename.aspx.
Any reason you can think of why this page isn't correctly detecting that we're running under https?