Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No response while using ngrok to expose a local web server

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.

Screenshot - ngrok fired

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?

like image 599
Ben Avatar asked Jul 19 '18 02:07

Ben


2 Answers

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

Credits

like image 66
Alexei - check Codidact Avatar answered Oct 16 '22 19:10

Alexei - check Codidact


Try make your service as http, not https.

like image 31
Nguyen Quang Minh Avatar answered Oct 16 '22 17:10

Nguyen Quang Minh