after spending 20 hours on this, I finally found the solution. The issue wasn't the godaddy ssl certificate, I found this out after I went and got another ssl from rapidssl. The issue is rackspace use a load balancer on their server so the Request.IsSecureConnection is never got set to true. I ended up using a server variable instead. Below is the solution on the CommonHelper.cs on the EnsureSSL function
if (!IsSecureConnection) { if (SettingManager.GetSettingValueBoolean("Common.UseSSL")) { if (!HttpContext.Current.Request.Url.IsLoopback) { ReloadCurrentPage(true); } } } }
I hope this solution will save some one else 20 hours.
I am attempting to install nopcommerce on a Load Balanced Server and have been experienced the issue where Request.IsSecureConnection always returning false.
I have also used something similar to the solution that code warrior used using HttpContext.Current.Request.ServerVariables["HTTP_CLUSTER_HTTPS"]
Unfortunately this variable is never set. I suspect that this variable is only available in some load balanced environments.
I have tried HttpContext.Current.Request.Url.Scheme. This always returns http on a https page?
Does anyone have a suggestion as to how I can solve this one?
Just to summarise the problem. In a Load Balanced environment the SSL connection stops at the load balancer so that you can never test for an SSL connection using standard methods such as: - HttpContext.Current.Request.IsSecureConnection - HttpContext.Current.Request.Url.Scheme - Request.ServerVariables["HTTPS"]
In a load balanced environment a custom request gets inserted into the header to assist in identifying a secure request. Assuming that your host has setup this variable on their load balancer its name could be anything. In the case of Rackspace it appears to be "HTTP_CLUSTER_HTTPS". In my case the name was "HTTP_NR_SSL", this being the name setup for the Host Net Registry.
Contact your host and ask them for the server variable to identify a HTTPS request in a load balanced environment. With the correct variable name Code Warriors solution should work for you.