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?
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?
Update for Aspnet Core 2.0, now, you should use Request.IsHttps inside your controllers.