title: HTTPS from a console application?
body: <p>I am not using <a href="http://en.wikipedia.org/wiki/Internet_Information_Services" rel="noreferrer">IIS</a>, and it isn't even installed on this computer. I also don't any <code>app.config</code> files or <code>web.config</code> files in my console hosted <a href="http://en.wikipedia.org/wiki/Windows_Communication_Foundation" rel="noreferrer">WCF</a> <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" rel="noreferrer">REST</a> service. But I would like to try and get HTTPS running on the host console application:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          string baseAddress = "http://" + Environment.MachineName + ":8000/Service";
          ServiceHost host = new ServiceHost(typeof(Service), new Uri(baseAddress));
          //WebHttpBinding binding = new WebHttpBinding();
          //binding.Security.Mode = WebHttpSecurityMode.Transport;
          host.AddServiceEndpoint(typeof(IService), new WebHttpBinding(), "").Behaviors.Add(new WebHttpBehavior());
          host.Open();
  
          Console.WriteLine("Host opened");
          Console.ReadLine();
  </code></pre>
  
  <p>Is there a way I can have my service running in <a href="http://en.wikipedia.org/wiki/HTTP_Secure" rel="noreferrer">HTTPS</a>?</p>