Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ngrok with visual studio 2017 and IIS express fails to connect

So I'm trying to setup my dev machine to be able to respond to some webhooks, as per the twilio documentation here:

https://www.twilio.com/docs/usage/tutorials/how-use-ngrok-windows-and-visual-studio-test-webhooks

I've got ngrok installed, and have the tunnel up and running, pointing at the port that is specified in visual studio. In this case, 44336. enter image description here enter image description here

However, if I go to visit the external URL, I get a very long load time, and eventually a 502 error. Visiting localhost works fine as expected.

So, I tried setting ngrok to point at 8080, and I get a little further along, but still no luck with the following error message in the browser.

enter image description here

With the first tunnel attempt, I can see the GET/ requests show up in the ngrok client, but no error. In the second attempt, I can see the 502 errors:

enter image description here

So I have two questions: How can I diagnose the source of the problem? And how can I setup IIS to accept connections from ngrok?

like image 870
Scuba Steve Avatar asked Sep 05 '18 20:09

Scuba Steve


Video Answer


1 Answers

This is resolved in the latest version of ngrok (at this time 2.3.23).

A related closed issue can be referenced here: https://github.com/inconshreveable/ngrok/issues/448

You can now run:

ngrok http https://localhost:<port> -host-header="localhost:<port>"

for your example:

ngrok http https://localhost:44336 -host-header="localhost:44336"
like image 185
Jason G. Avatar answered Sep 30 '22 07:09

Jason G.