How to enable external request in IIS Express?

前端 未结 26 1176
借酒劲吻你
借酒劲吻你 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:49

    [project properties dialog]

    For development using VisualStudio 2017 and a NetCore API-project:

    1) In Cmd-Box: ipconfig /all to determine IP-address

    2a) Enter the retrieved IP-address in Project properties-> Debug Tab

    2b) Select a Port and attach that to the IP-address from step 2a.

    3) Add an allow rule in the firewall to allow incoming TCP-traffic on the selected Port (my firewall triggered with a dialog: "Block or add rule to firewall"). Add will in that case do the trick.

    Disadvantage of the solution above:

    1) If you use a dynamic IP-address you need to redo the steps above in case another IP-address has been assigned.

    2) You server has now an open Port which you might forget, but this open port remains an invitation for unwanted guests.

提交回复
热议问题