title: Visual Studio 2017 debugging .Net Core 2.0 Using IISExpress, Https, and a non-localhost URL
body: <p>I'm having an issue with Visual Studio 2017 and debugging a web app using SSL. I suspect it's an issue with an untrusted developer certificate but I can't get Visual Studio to trust the cert like it usually does. The issue only happens when trying to launch with an https enabled non-localhost URL.</p>
  
  <p><a href="https://i.stack.imgur.com/CqWvV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CqWvV.jpg" alt="Debugger error"></a></p>
  
  <p>The following scenarios work, based on the project settings in the debug section. The project will launch with the App URL, the debugger works, and the SSL URL works.</p>
  
  <pre><code>App URL: http://localhost:12345
  Enable SSL: https://localhost:43123
  
  App URL: https://localhost:43123
  Enable SSL: https://localhost:43123
  
  App URL: http://some-custom-domain:12345
  Enable SSL: https://some-custom-domain:43123
  </code></pre>
  
  <p>The following does NOT work and throws the error above when launching the debugger:</p>
  
  <pre><code>App URL: https://some-custom-domain:43123
  Enable SSL: https://some-custom-domain:43123
  </code></pre>
  
  <p>I have tried deleting my launchsettings.json, removing all localhost certs and repairing my IISExpress install to generate a new cert, deleting the bin/obj folders and rebuilding, deleting the .vs folder and rebuilding. </p>
  
  <p>When I run a Core 1.x project using an HTTPS url it prompts me to trust the cert, and then it runs as normal. </p>
  
  <p>Any insight would be helpful. My workaround is to enforce redirection to HTTPS on my development environment but I'd love to be able to launch right into the HTTPS URL.</p>