本地主机Owin主机

时间:2017-01-12 16:32:45

标签: localhost nancy

我在owin self主机中托管一个简单的nancyfx应用程序。

  static void Main(string[] args)
    {
        using (WebApp.Start<Startup1>("http://localhost:8002"))
        {
            Console.WriteLine("START");
            Console.ReadLine();
        }
    }
}

我无法通过LAN连接到此计算机我已关闭防火墙。是吗 可以在局域网上使用localhost并假设我的路由器上有正确的端口转发配置是否可以通过WAN? 目前我得到:

Bad Request - Invalid Hostname

我以为我误解了localhost。 我使用时为什么会出现异常:

 using (WebApp.Start<Startup1>("http://192.168.1.121:8002")){ //my machines lan ip


Exception has been thrown by the target of an invocation.

0 个答案:

没有答案
相关问题