简体   繁体   English

在Windows 10上的IIS上部署MVC 6

[英]Making MVC 6 deploy on IIS on Windows 10

I'm using 1.0.0-rc1-update1 and on IIS Express it works fine, but when I deploy to IIS, I get a blank page. 我正在使用1.0.0-rc1-update1 ,在IIS Express上工作正常,但是当我部署到IIS时,我得到一个空白页面。 Nothing. 没有。 No errors, nothing in the event log - this is the same problem even for a vanilla MVC6 web application, so I doubt it's my code! 没有错误,事件日志中没有任何内容 - 即使对于一个vanilla MVC6 Web应用程序,这也是同样的问题,所以我怀疑这是我的代码!

I am pointing the application to the www folder under the published folder and I have my app pool set up for .net 4 我将应用程序指向已发布文件夹下的www文件夹,我将我的应用程序池设置为.net 4

Am quite used to getting errors out of IIS, but this is a new one on me! 我很习惯从IIS中获取错误,但这对我来说是一个新的错误! Would anyone be able to help? 有人能帮忙吗? Or maybe at least point me at some log files? 或者至少指出一些日志文件?

在此输入图像描述

在此输入图像描述

Thanks @Ruslan for your help here. 在此感谢@Ruslan的帮助。

The link you provided had the answer off it as a "current word around for Beta8", which also appears to be a necessary work around for RC1!!! 您提供的链接有一个答案,作为“Beta8的当前词汇”,这似乎是RC1的必要工作!

https://github.com/aspnet/Hosting/issues/416 https://github.com/aspnet/Hosting/issues/416

Basically, the "blank screen" I was getting was actually a 404 (I got more info by adding app.UseStatusCodePages(); to my startup. 基本上,我得到的“空白屏幕”实际上是404(我通过添加app.UseStatusCodePages();获得更多信息到我的创业公司。

The work around was to rename the Configure method (I called it Configure1 as per the link above) and to create a stub Configure method to call it indirectly via the app.Map() method: 解决方法是重命名Configure方法(我按照上面的链接称它为Configure1)并创建一个存根Configure方法,通过app.Map()方法间接调用它:

    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
    {
        app.Map("/GilLecORM", (app1) => this.Configure1(app1, env, loggerFactory));
    }

It now works - but clearly this is a fairly big problem for the RC :) 它现在有效 - 但显然这是RC的一个相当大的问题:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM