ASP.NET 5 add app as IIS application

心已入冬 提交于 2019-11-30 22:01:41

This problem started with beta8 and is still an open issue in RC1. See ASP.NET IIS Integration issue #14. "That fix is coming." says @davidfowl. "This is a workaround until the fix is available. We're working with the httpPlatformHandler team to fix bugs found in beta8 and rc1."

The workaround is to map the IIS app path in Startup.Configure like this:

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    app.Map("/MyAppPath", (myAppPath) => this.ConfigureMyAppPath(myAppPath, env));
}

public void ConfigureMyAppPath(IApplicationBuilder app, IHostingEnvironment env)
{
    // the actual Configure code
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!