Self hosted OWIN and urlacl

前端 未结 3 1537
北荒
北荒 2020-11-29 05:53

I\'ve created a self hosted Nancy/SignalR application self-hosted in OWIN using Microsoft.Owin.Host.HttpListener and Microsoft.Owin.Hosting

<
3条回答
  •  天命终不由人
    2020-11-29 06:25

    Thanks to the info that @kay.one provided I was able to access my self-hosted Web API 2.2 (OWIN/Katana, console app) from the same machine via IP address. However just consolidate it into a simple step-by-step:

    1. In Main of Program.cs (for console app): WebApp.Start("http://*:8080");
    2. From Windows Command Prompt (run as Administrator) enter netsh http add urlacl http://*:8080/ user=EVERYONE
    3. Go to Windows Firewall with Advanced Security and add an Inbound Rule that opens up TCP port 8080

    You should then be able to access from another machine using IP address or computer name.

    Disclaimer: I'm not a security expert so I don't know the security implications of doing this.

提交回复
热议问题