Reputation: 467
I'm trying to expose my local web server IIS Express using ngrok. Followed steps from https://ngrok.com/docs and fired the tunnel, but can't get response.
I'm using Visual studio via IIS Express. (Debug mode, local website works well.)
If local website not started, access to XXXXX.eu.ngrok.io
will get error directly:
Failed to complete tunnel connection
The connection to https://2713343d.eu.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:44320.Make sure that a web service is running on localhost:44320 and that it is a valid address.The error encountered was: dial tcp [::1]:44320: connectex: No connection could be made because the target machine actively refused it.
No errors shows on Ngrok's Web Interface too.
Is there any way to check where the problems are? or see ngrok's log?
Upvotes: 7
Views: 8118
Reputation: 23088
Indeed it works with http, but it is strongly recommended to work with https, so you should properly start ngrok in order to work with https:
ngrok http -host-header=localhost https://localhost:{your_IIS_express_port}
After this you should be able to access your URL:
https://{id}.ngrok.io
Upvotes: 5