How to enable external request in IIS Express?

前端 未结 26 1134
借酒劲吻你
借酒劲吻你 2020-11-22 01:55

How can I enable remote requests in IIS Express? Scott Guthrie wrote that is possible but he didn\'t say how.

相关标签:
26条回答
  • 2020-11-22 02:36

    I was unable to serve iis requests to other users in my local network, all I had to do (in addition to the above) was restart my BT Hub router.

    0 讨论(0)
  • 2020-11-22 02:37

    As a sidenote to this:

    netsh http add urlacl url=http://vaidesg:8080/ user=everyone
    

    This will only work on English versions of Windows. If you are using a localized version you have to replace "everyone" with something else, for example:

    • "Iedereen" when using a Dutch version
    • "Jeder" when using a German version
    • "Mindenki" when using a Hungarian version

    Otherwise you will get an error (Create SDDL failed, Error: 1332)

    0 讨论(0)
  • 2020-11-22 02:37

    I solved it with the installation of "Conveyor by Keyoti" in Visual Studio Professional 2015. Conveyor generate a REMOTE address (your IP) with a port (45455) that enable external request. Example:

    Conveyor allows you test web applications from from external tablets and phones on your network or from Android emulators (without http://10.0.2.2:<hostport>)

    The steps are in the following link :

    https://marketplace.visualstudio.com/items?itemName=vs-publisher-1448185.ConveyorbyKeyoti

    0 讨论(0)
  • 2020-11-22 02:37

    The simplest and the coolest way I found was to use (it takes 2 minutes to setup):

    https://ngrok.com/

    It will work with anything running on localhost. Just signup, run little excutable and whatever you run on localhost gets public URL you can access from anywhere.

    This is good for showing stuff to your remote team mates, no fiddling with IIS setup or firewalls. Want to stop access just terminate executable.

    ngrok authtoken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
    ngrok http -host-header=localhost 89230
    

    assuming that 89230 is your IIS Express port

    You can also run multiple ports even on free plan

    0 讨论(0)
  • 2020-11-22 02:38

    What helped me, was right clicking the 'IISExpress' icon, 'Show All applications'. Then selecting the website and I saw which aplicationhost.config it uses, and the the correction went perfectly.

    0 讨论(0)
  • 2020-11-22 02:40

    A good resource is Working with SSL at Development Time is easier with IISExpress by Scott Hanselman.

    What you're after is the section Getting IIS Express to serve externally over Port 80

    0 讨论(0)
提交回复
热议问题