HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) in Dot net core 3.1

50k views Asked by At

**I had checked all possible ways to Solve this error like

  1. installed dot net core 3.1 runtime environment
  2. set AspNetCoreHostingModel as OutProcess But still getting this error when i'm trying to set my Default Nopcommerce 4.3 Project on IIs to run on it . Please Help as I already spent too much time to solve this error**

enter image description here

11

There are 11 answers

0
Rinku Choudhary On BEST ANSWER

I struggled a lot to find out this problem's solution . after 4 5 days research, I come to know the exact solution. Kindly follow all the below steps, definatly it will work for Nopcommerce 4.3 Issue using dotnetcore 3.1 or normal dotnetcore 3.1 project.

Step1 : check dotnet version and sdk using cmd enter image description here

Step 2: add the IISUSER or you can also give Everyone permission to the main folder

Step 3: If it is nopcommerce 4.3 project then configure the path

enter image description here and paste below folders in bin->debug->netcoreapp3.1

App_Data,Views,wwwroot,Plugins,Themes,logs,Areas/Views,web.config

Note : this is the main solution after adding the web.config under bin->debug->netcoreapp3.1

<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" arguments=".\Nop.Web.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" hostingModel="InProcess">

enter image description here

Note : If you have configured your site already in iis, then do the last step reset the iis using cmd. open cmd as administrator and run command iisreset enter image description here

I hope this will resolve your all issues

2
Ayesh Silva On

ASP.NET Core 3.1 Runtime (v3.1.6) - Windows Hosting Bundle

You can download it from here.

0
Fede On

The same thing happened to me in .net core 3.1. In my case some server roles and features were missing

Checking the Application Event Log I found the error '0x8007023e' AspNetCore Module V2

Checking the System Event Log I found a WAS (Windows Process Activation Service) communication error: WAS (Windows Process Activation Service) communication error

Then I installed the following roles and features: Roles and Features, WAS

enter image description here

Also I reinstalled ASP.NET Core Module (is a native IIS module that plugs into the IIS pipeline, allowing ASP.NET Core applications to work with IIS)

Finally I had to reassign the app pool to the site, and everything worked (I'm using InProcess model)

1
Jayadul Shuvo On

If the .net SDKs are installed properly, yet not throwing the same error. Then please check if you selected a dedicated apppool for and that selected to CLI version to No managed code.

0
Prashant Agarwal On

In my case, it was web.config file. My site was hosted as an application inside another website (app folder). Adding "location" tag with inheritInChildApplication="false" resolved the issue for me.

<location path="." inheritInChildApplications="false">
  <system.webServer>
    <!-- other configs -->
  </system.webServer>
</location>
0
Kurtis Jungersen On

I just encountered this issue today, and used Rick Strahl's Blog Post on the subject to troubleshoot.

Ultimately, using the Windows Event Log proved to be the most helpful at finding the actual error, which for me was a malformed line in the web.config. This was targeting a .exe rather than the .dll for the app (published as framework-dependent instead of standalone). As such, IIS was unable to even do anything, and wasn't even logging to STDOUT or give a more descriptive error.

An abbreviated example is that I had this:

<aspNetCore processPath=".\MyApp.exe" ... />

Instead of this:

<aspNetCore processPath="dotnet" 
            arguments=".\MyApp.dll" ... />

Since the .exe didn't exist, IIS was throwwing an error.

2
Yash Lad On

HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) in Dot net core 3.1

Solution :

Click on the Project Properties

Select Hosting Model "Out of Process" Try this.

Project settings

1
clamchoda On

If you've installed the hosting bundle this error is often a permission issue. Since this is the first question that comes up on google, I wanted to add more information on how to debug if the problem is indeed a permission issue.

  • Look in the Event viewer under Applications. You may see an Error for source IIS AspNetCore Module V# stating;

    • Unexpected exception: status: Access is denied.: "C:\Program Files (x86)\dotnet\dotnet.exe"
  • Right-click your site in IIS -> Manage Website -> Advanced Settings.

    • Note the name of your application pool.
  • In IIS under the Application Pools section, note the Identity of the application pool with the matching name.

  • Right click C:\Program Files (x86)\dotnet (or whatever folder the event viewer is complaining about) and select Properties.

    • On the Security tab -> Edit -> Add the appropriate Application Pool Identity as a user with permissions.
0
Lemraj On

I just encountered this issue today when migrating to .NET 6. I tried different suggestions i have read here and elsewhere, but without any success, till i saw the answer of @Kurtis. I saw the errors in the even log, but in my case it was the path to the .exe and not the DLL.

enter image description here

enter image description here

As you can see this was pointing to the old net5 folder. I changed the path in the config file and voila! I had to recycle the app pool was used, iisreset was not enough!

Thank you Kurtis!

0
Vitaly Leskiv On

In my case I had incorrect path starting with "\bin\net6.0\app.exe". IIS maps it as "C:\bin\net6.0\app.exe" . It should be ".\bin\net6.0\app.exe" or "bin\net6.0\app.exe".

0
MrAlbino On

My problem was solved with the following steps;

Right Click on Project > Properties > Web > Project Url change https -> http