Adrien Clerbois' blog

Developer @ Ingenico, Freelance @ AClerbois, Microsoft MVP Visual Studio and Development Technologies

ngrok, expose your local website into the wild

ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels.

ngrok

Start by downloading the exe file at this location: https://ngrok.com/download

Extract the application, open a console application and go on the directory where ngrok was extracted.

Launch the ngrok.exe application and add the port to expose:

ngrok http 8081

In addition, if you use the IIS Express with Visual Studio, you need to configure more to reach your application.

  • Alter the file applicationhost.config (in the folder : [VSPROJECTFOLDER]/.vs/config/ ),
  • Found the line contains “:8081:localhost” and remove “:localhost” to have only “:8081”.
  • Restart your visual studio.

  • Call the ngrok with :
ngrok http 8081 -host-header="localhost:8081"

Once the ngrok launch you get an access to your tunnel by and url i e : http://1cac6d41.ngrok.io