ASP.net check if page is http or https
asp.net, https
Solution
You can refer to the `Request.IsSecureConnection` property on the `HttpRequest` class. For a full reference outside a page, user control or alike, use `HttpContext.Current.Request.IsSecureConnection`.
Problem
I have a web application hosted on multiple servers some of which are on https. How can I check from code behind if a page is currently in http or https?