Accessing localhost over the internet

logo.pngAs part of the development cycle, accessing your code running on localhost via the internet would be very helpful. Whether it be for an app or for an external SSO test, debugging and tracing on your local machine is a nice tool to have.

Here’s how you can do it:

Sign up for a free account at

Download and unzip the ngrok.exe client into a location somewhere in your PATH. For example, c:\

On the ngrok site get your “authtoken” (a long random string of letters) and run this:


Close Visual Studio, if open. Install the ngrok Visual Studio Extension

Open Visual Studio and the web site you wish to expose to the internet. Choose ngrok from the Tools menu.


A console window will appear. Ngrok will display a special URL. Use that URL in your device/service that needs to connect to your localhost.  This URL will change every time. To have it lock down, you can pay for a subscription, it’s really cheap. Otherwise the free version works just great.


If you wish to use the console instead of the Visual Studio Extension, you can run it like this:


The ngrok paid plans have nice features. It’s an affordable service and very helpful. Check them out.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s