2

I created two ASP.NET Core web applications - just API templates:

  • ASP.NET Core 2.2
  • ASP.NET Core 3.0

Deployed these applications to the Windows Server 2016 with latest (3.0 Runtime & Hosting Bundle). ASP.NET Core 2.2 works correctly without any problems, but ASP.NET Core 3.0 gives me this error from image below.

enter image description here

In event viewer I found error every time when I deploy or try to start 3.0 application:

Application 'C:\Inetpub\vhosts\webapp.com\httpdocs\' failed to start. Exception message: Unexpected exception: status: Access is denied.: "C:\Program Files (x86)\dotnet\dotnet.exe"

I just copied directory path with adding executable file to the command prompt, and this command opens localhost listener:

>  C:\Inetpub\vhosts\webapp.com\httpdocs\WebApp.exe

Then I can access to the webapp directly on server over localhost and port. I tried also to change directory permission but I didn't fix the issue.

Emin Mesic
  • 1,681
  • 2
  • 8
  • 18

1 Answers1

7

For me specifically I fixed this issue with adding web.config in application and replacing AspNetCoreModuleV2 to AspNetCoreModule, but this is not perfect solution.

Another solution is deploying application as Self-Contained.

enter image description here

Emin Mesic
  • 1,681
  • 2
  • 8
  • 18
  • what is the difference with .net 3 and AspNetCoreModuleV2 vs AspNetCoreModule? – Learner Jun 18 '20 at 05:26
  • @Learner the ASP.NET Core Module is an IIS Module which is responsible for process management of ASP.NET Core http listeners and to proxy requests to the process that it manages. More information here: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1 – Emin Mesic Jun 18 '20 at 08:23