Ben
Ben

Reputation: 467

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?

Upvotes: 7

Views: 8118

Answers (2)

Alexei - check Codidact
Alexei - check Codidact

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

Credits

Upvotes: 5

Nguyen Quang Minh
Nguyen Quang Minh

Reputation: 36

Try make your service as http, not https.

Upvotes: 2

Related Questions