Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Good day, I have an error with my ASP.Net Core application. I have installed two ASP.NET Core web sites on dnx451 framework on Windows Server 2012 in the Azure Cloud.

When I navigate to them in browser, they are infinitely loading. Before it happened I installed HttpPlatformHandler because of the following error, but right now I don't see anything exception infinite loading.

Error that I see before install HttpPlatformHandler.

enter image description here

Also,

  1. Application is running successfully from Visual Studio and dnx web.
  2. Insert logs in the startup (send emails), no logs where created.
  3. Loading page:

enter image description here

Please help, thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
2.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

Short Answer

Infinite loading occurs when IIS cannot find dnx.exe. That happens when the publish fails to include runtimes in its output.

Solution

Use the --runtime flag when publishing.

cd Project01
dnvm use 1.0.0-rc1-final -runtime clr   <------ Set the active runtime.
dnu build
dnu publish --runtime active            <------ Use the runtime flag.

The runtime flag provides the name or full path of the runtime folder to include, or active for the current runtime on the PATH.

If that still doesn't include the runtimes directory in the publish output, then upgrade to the most recent release of dnu, because there is a bug in older versions.

Explanation

Infinite loading occurs when IIS cannot find dnx.exe. That happens when the publish fails to include runtimes in its output.

Here is how to check whether a missing dnx.exe is causing the infinite loading problem.

  1. Publish your web application (e.g. dnu publish.)
  2. Navigate to the publish output directory (e.g. binoutput.)
  3. Make sure approot untimes....dnx.exe is present.

Here are the key files that the publish output must contain. I've omitted some other important files to for clarity.

Project01inoutput
    approot
        packages         
        runtimes <--------------------------------This is sometimes missing.
            dnx-clr-win-x64.1.0.0-rc1-final
                bin
                    dnx.exe <---------------------IIS needs to find this.
        src              
        global.json      
        web              
        web.cmd              
    logs
    wwwroot <-------------------------------------IIS Physical Path

External Links


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...