简体   繁体   English

ASP.NET 5 RC1部署到IIS挂起

[英]ASP.NET 5 RC1 Deploy To IIS Hangs

I installed the RC1 version of ASP.NET 5.0 on a Windows 2012 Server running IIS. 我在运行IIS的Windows 2012 Server上安装了RC5版本的ASP.NET 5.0。 After publishing my ASP.NET 5 application to the server, I try to access the default web page and the web browser hangs (it just clocks indefinitely). 在将我的ASP.NET 5应用程序发布到服务器之后,我尝试访问默认网页并且Web浏览器挂起(它只是无限时钟)。 Everything runs correctly within Visual Studio. 一切都在Visual Studio中正确运行。 It only does this when I publish it to an IIS server. 它只在我将其发布到IIS服务器时执行此操作。

I followed the instructions in this lunch to publish and deploy to the IIS server: http://docs.asp.net/en/latest/publishing/iis.html . 我按照午餐中的说明发布并部署到IIS服务器: http//docs.asp.net/en/latest/publishing/iis.html

Has anyone else experienced this and resolved the issue? 还有其他人经历过这个并解决了这个问题吗? If so, what did you do to fix it? 如果是这样,你做了什么修复它?

Joel, 乔尔,

I ran across the same issue today, trying to deploy ASP.NET 5 applications to IIS on Azure VMs. 我今天遇到了同样的问题,试图将ASP.NET 5应用程序部署到Azure VM上的IIS。

You might not be deploying the DNX runtime with your application, or something is preventing/killing the Kestrel or WebListener process. 您可能没有在应用程序中部署DNX运行时,或者正在阻止/终止Kestrel或WebListener进程。 From what I found, the request hangs because Kestrel (or whatever listener you're running with dnx web) doesn't start, or crashes during the request. 根据我的发现,请求会挂起,因为Kestrel(或者您使用dnx web运行的任何侦听器)在请求期间无法启动或崩溃。

For me, this happened because I wasn't publishing the application properly with dnu publish. 对我来说,这是因为我没有使用dnu发布正确发布应用程序。

Check the ../approot folder and ensure it has the following directory structures: 检查../approot文件夹并确保它具有以下目录结构:

../approot
     /packages // NuGet Packages
     /runtimes // DNX lives here
     /src // Your code

If you're missing /runtimes, you'll see the request hang. 如果你缺少/运行时,你会看到请求挂起。

To add them, I used the following command: 要添加它们,我使用以下命令:

dnu publish --out <output directory> --configuration <build configuration> --wwwroot <web root name> --wwwroot-out <web root output name> --runtime <either "active" or current runtime> --iis-command web

If this doesn't fix the issue, something may be crashing the application process. 如果这不能解决问题,可能会导致应用程序进程崩溃。

What helped me is to run 帮助我的是跑步

dnu restore dnu恢复

command after copying files to the server. 将文件复制到服务器后的命令。 It appeared, that IIS couldn't start approot\\web.cmd, I've found that after running web.cmd manually. 看来,IIS无法启动approot \\ web.cmd,我发现手动运行web.cmd后。 Then I googled the error and came to this answer 然后我用Google搜索了错误并得出这个答案

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

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