Provide external HTTPS access to developer machine hosted web application
I was wondering how you would go about the following scenario:
Given a Web Application that is running in a IIS Express (or Console Application hosting a Kestrel Server) that needs to be accessed from outside (non-localhost) on a Windows machine.
The tricky/important part here is the HTTPS access that is required.
The default development SSL certificate is created for "localhost" and if you access the application by any other url than https://localhost most applications and browsers will consider it to be an unsafe / untrusted connection due to the certificate name not matching the url.
So what is the easiest / simplest way to host a Web application on your local development machine (in IIS Express or Kestrel Console Host) and still grant outside secure connection that is considered trusted.
Ideally without using any external services (which are usually frowned upon by many companies due to data protection concerns)
12 comments · 82% upvoted · other discussions
u/broken-neurons answer is probably the more complete/secure/proper way of doing exactly what you described, but if you're willing to fudge on the "no external services" part, there is a way to do this with ngrok that would be pretty simple. It's an easy, quick way of exposing your local app and has an https flag in the cli command, but it will give you a new url every time you open the tunnel, if that's an issue for you.
deleteAllfromUsersJk 1 points · Jun 2020
This post covers the https part specifically. If you want to go this route, you may have to use info from both of these links to get it going. (I usually use ngrok with apps deployed to an actual IIS, not IIS Express, instance, but with the info above, I don't see why you couldn't achieve external https exposure from IIS Express.)