6

I installed the RC1 version of ASP.NET 5.0 on a Windows 2012 Server running IIS. 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). Everything runs correctly within Visual Studio. It only does this when I publish it to an IIS server.

I followed the instructions in this lunch to publish and deploy to the IIS server: 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
  • 103
  • 4

2 Answers2

1

Joel,

I ran across the same issue today, trying to deploy ASP.NET 5 applications to IIS on Azure VMs.

You might not be deploying the DNX runtime with your application, or something is preventing/killing the Kestrel or WebListener process. 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.

For me, this happened because I wasn't publishing the application properly with dnu publish.

Check the ../approot folder and ensure it has the following directory structures:

../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.

0

What helped me is to run

dnu restore

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. Then I googled the error and came to this answer

Community
  • 1
  • 1
Lanayx
  • 2,731
  • 1
  • 23
  • 35