首页 文章

如何在本地服务结构集群中部署和访问guest虚拟机可执行文件(ASP.NET OWIN自托管webapi应用程序)

提问于
浏览
0

我创建了一个ASP.NET Owin自托管webapi应用程序 . 下面是owin自己的主机代码片段

using Microsoft.Owin.Hosting;

namespace OwinSelfHostSample

{

    class Program

    {

        public static void Main(string[] args)

        {

            string localhost = "http://localhost:80";

            // Start OWIN host 
            using (WebApp.Start<LocalStartup>(localhost))
            {
                Console.ReadLine();
            }
        }
    }
}

我可以运行Owin exe并联系我的服务 endpoints ,如http://localhost:80/keepalive

当我尝试按照here中的说明将此作为来宾可执行文件部署到本地服务结构集群时,发布成功,但我无法命中 endpoints . 我总是得到503服务不可用的http响应 . 事件查看器中也没有相关错误 .

1 回答

相关问题