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

后端 未结 6 2277
Happy的楠姐
Happy的楠姐 2020-12-12 08:58

From previous versions of the question, there is this: Browse website with ip address rather than localhost, which outlines pretty much what I\'ve done so far...I\'ve got th

6条回答
  •  生来不讨喜
    2020-12-12 09:38

    This didn't work for me. you could do the following:

    For IIS Express

    In VS 2015: Go to the .vs\config\applicationhost.config folder in your project

    In VS 2013 and earlier: Go to %USERPROFILE%\My Documents\IISExpress\config\applicationhost.config

    Find the binding that says:

    
    

    For me it was a project running on port 5219

    change it to

      
    

    IIS Express will now accept all incoming connections on that port.

    Disadvantage: you need to run IIS Express as admin.

    or you could rewrite the host header in Ngrok:

    ngrok.exe http -host-header=rewrite localhost:5219
    

提交回复
热议问题