title: WCF Web Api with HTTPS
body: <p>Just to put some context.
  ASP.NET MVC2
  Web API 5
  IIS 7</p>
  
  <p>I am trying to use the WCF Web API and as soon as I enable HTTPS, it stop working.</p>
  
  <p>Things I noticed:
  My API call I do through jquery, and I have something like this as the url:
  <a href="http://www.domain.com/api/serviceApi/SetForeignToken?token=ASDAS-ASDAS-ASDASD-ASDASDAS&amp;foreignToken=AS123ASD" rel="nofollow">http://www.domain.com/api/serviceApi/SetForeignToken?token=ASDAS-ASDAS-ASDASD-ASDASDAS&amp;foreignToken=AS123ASD</a></p>
  
  <p>When I use the API test UI I through:
  <a href="https://www.domain.com/api/serviceApi/Test" rel="nofollow">https://www.domain.com/api/serviceApi/Test</a>
  I see for the test url:
  <a href="https://devserver.ad.domain.com/api/serviceapi/SetForeignToken?token=ASDAS-ASDAS-ASDASD-ASDASDAS&amp;foreignToken=AS123ASD" rel="nofollow">https://devserver.ad.domain.com/api/serviceapi/SetForeignToken?token=ASDAS-ASDAS-ASDASD-ASDASDAS&amp;foreignToken=AS123ASD</a>
  It just seems od the it resolves the DNS to the machine name instead of keeping the normal DNS, as it did before without HTTPS.</p>
  
  <p>Does anyone know how to configure the API to make this work unde HTTPS, or is it even possible?</p>
  
  <p>Thanks,</p>
  
  <p>PS. The Development Enviroment has a self-signed certificate while the production will have a real certificate.</p>