asp.net - Exposing localhost to the internet via tunneling (using ngrok): HTTP error 400: bad request; invalid hostname -


from previous versions of question, there this: browse website ip address rather localhost, outlines pretty i've done far...i've got local ip working. found ngrok, , apparently don't need connect via ip.


what trying expose website running on localhost internet. found tool this: ngrok.

running website in visual studio, website starts on localhost/port#. run command "ngrok http port#" in command line. seems start fine. generate couple of urls, , ngrok inspection url (localhost:4040) works.

the problem when go generated urls, http error 400: bad request invalid hostname. different error when run "ngrok http wrongport#", host not found error...so think happening. can't tell what...

is there step missing in exposing site internet via tunneling service? if there is, can't find in ngrok documentation.

troubleshot issue ngrok. in words of inconshrevable, applications angry when see different host header expected.

running following command should fix problem:

ngrok http [port] -host-header="localhost:[port]" 

however, may not comprehensive fix (apparently @ least 1 different case can cause issue), check out other answer well


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -