I'm used to using a Mac, and ngrok is a breeze; all you have to do is specify the port, but I am new to IISExpress and I cannot figure out how to use ngrok and / or IIS correctly. To be clear, I inherited a Windows computer from an employee (who left the company), and the setup works fine in place.
The local url is similar to:
thing.somedomain.com
In the IIS bindings section, I have:
Type Host Name Port IP Address http thing.somedomain.com 80 *
I used this page for reference: https://www.twilio.com/blog/2014/03/configure-windows-for-local-webhook-testing-using-ngrok.html
The instructions seem reasonable, but they do not work for me. These instructions show that the applicationhost.config file needs to be changed for IIS. I found this file and found the correct section for the site that I need for ngrok. The binding information does not match what in IIS gui:
<binding protocol="http" bindingInformation="*:4085:localhost" />
In accordance with the instructions, I added:
<binding protocol="http" bindingInformation="*:4085:whatever.ngrok.io" />
(Here every time I run ngrok on windows, I get ngrok.io instead of ngrok.com, which seems strange. I tried to access both paths with no luck.)
I restarted the site in IIS (in the action menu). When I try to access the ngrok url from the remote machine, ngrok returns 502 bad gateways, and the remote machine shows:
Failed to complete tunnel connection The connection to http:
When I try to go to localhost: 4085 locally, I get "This webpage is unavailable." When I try to switch to localhost: 80, I get a redirect to another site serving IIS. When I try 127.0.0.1:80, I get a 404 error.
I tried using netstat -a -b and tried all the ports associated with 127.0.0.1 and nothing works on the correct site (but still thing.somedomain.com still works correctly).
I am completely puzzled and do not know what to do next or where the problem is (how I start ngrok, how I access ngrok, how bindings bind, how IIS reboots, firewall problem or some other voodoo ) It should be just bloody!