title: Checking Url if it starts with "http" or "https", is it possible that a non-secure Url starts with "https"?
body: <p>I am publishing my website to an IIS server which I don't have control over, and I want to understand from codebehind that if it's URL starts with "http" or "https". </p>
  
  <p>First, I tried these two solutions on my local, and both returned the correct value ("http"):</p>
  
  <pre><code>this.Request.Url.Scheme 
  
  Request.IsSecureConnection
  </code></pre>
  
  <p>To be sure, I also installed a secure SSL connection to my own computer's IIS, and published the same code. Both these codes grabbed the correct value (https) there too.</p>
  
  <p>However, when I publish it to the IIS server of my company, which uses "https", it returns as "http" instead. </p>
  
  <p>What would be the issue here? I noticed that the URL I am trying might not be considered a secure layer even it starts with "https" (It is not turning green and shown as secure when I call the page from Google Chrome) so maybe it's not a secure layer it's only a regular page only starts with "https" instead of http. Is this kind of scenario possible?</p>