twilio-labs / NgrokExtensions

Visual Studio integration with ngrok
MIT License
48 stars 26 forks source link

Server unresponsive (502) when running against Ngrok #14

Closed nhwilly closed 6 years ago

nhwilly commented 6 years ago

This is the oddest thing.

I was running this just fine against a test project and then one morning, it just quit working. It has to be something I've done, but I'm having trouble debugging it.

I launch the site in debug mode - the site comes up fine. I publish the site to Azure - the site comes up fine. But if I launch in debug mode and attempt to access it via an ngrok tunnel, my site just does nothing. The Inspect web page shows the call coming in and it looks find to me. Just nothing goes out.

I tried routing other sites using ngrok and they work fine.

I've tried using the VS2017 extension and the CLI launch - same each way.

I noticed when testing the other sites that I didn't have to grant permissions using netsh to handle those incoming requests and they still worked fine. I tried deleting the permissions for the site in question and it didn't help.

Ever hear of anything like this?

TIA

nhwilly commented 6 years ago

Oh, I forgot. No exceptions showing the Output window, either. It's just silent. I'm not even sure where to put in the debugger to see what's not working.

nhwilly commented 6 years ago

Ok, after a ton of trial and error (because I don't know enough), it turns out to be an IIS problem, probably having to do with SSL.

Since it's a ASP.NET Core project, I simply launched it in self hosted mode and everything is back working. I don't have it in me to troubleshoot this anymore, so if you want to close it, that's fine.

dprothero commented 6 years ago

It is true if you were hosting the app with SSL turned on, ngrok would not be able to tunnel to it. When I launch ngrok, I'm launching it with http mode, so it's not expecting SSL. If this becomes more common of an issue, we could look at having an option to launch ngrok in tls mode.

nhwilly commented 6 years ago

Thanks. Working great now. Seriously love the VS2017 extension. Just a huge time saver.