HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) in Dot net core 3.1
Solution 1
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
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
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">
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
I hope this will resolve your all issues
Solution 2
ASP.NET Core 3.1 Runtime (v3.1.6) - Windows Hosting Bundle
You can download it from here.
Solution 3
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'
Checking the System Event Log I found a WAS (Windows Process Activation Service) communication error:
Then I installed the following roles and features:
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)
Solution 4
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.
Solution 5
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.
Rinku Choudhary
Love to learn and share the knowledge..Sky is not limit..
Updated on July 04, 2022Comments
-
Rinku Choudhary over 1 year
**I had checked all possible ways to Solve this error like
- installed dot net core 3.1 runtime environment
- 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**
-
jdweng almost 3 yearsCheck the IIS Event Viewer for errors to get more Info. You are getting an exception in the IIS. The issue may be you are trying to access the IIS file system and do not have the credentials to access the file system. Did you do a publish and install the setup.exe folder? A Net application will only run on a deploy machine if the version of Net is same on both build and remote machine. So the core version has to be the same. You can also add to the body of the response the Stack Trace for the exception so you can determine the exact cause of issue.
-
Rinku Choudhary almost 3 years@jdweng I m not publishing. it's default nopcommerce 4.3 so i'm installing it on iis as a localhost
-
jdweng almost 3 yearsWhat do you mean by "My Default Nopcommerce 4.3 Project"? It sound like you are doing two things 1) Installing Nopcommerce 4.3 2) Installing a c# app which calls Nopcommerce 4.3.
-
Rinku Choudhary almost 3 yearsYeah I'm Installing Nopcommerce 4.3 Project which is build in dot net core 3.1 on IIS
-
jdweng almost 3 yearsI think there is something wrong with Net 3.1.14 (see dotnet.microsoft.com/download/dotnet/3.1?force_isolation=true). You need to download a compatible runtime version of Core 3.1 that you built with. I've answered in the last couple of weeks a few similar question to yours. If you look at link for 3.1.13 it says " On Windows, we recommend installing the Hosting Bundle, which includes the .NET Runtime and IIS support." It doesn't say same for 3.1.14. You may want to try an earlier version of Core 3.1. I think there is something missing in 3.1.14.
-
jdweng almost 3 yearsIt looks like in 3.1.13 something was missing and the kludge was to download two packages. In 3.1.14 it looks like Microsoft attempted to fix the issue and again failed. Download the patches : devblogs.microsoft.com/dotnet/net-core-april-2021-updates/…
-
Rinku Choudhary almost 3 yearsThanks @jdweng .Exactly it was my main issue..
-
Rinku Choudhary almost 3 yearsStill same issue is there
-
Badhon Jain about 2 yearsIt solved my problem for .net core 3.1
-
Admin about 2 yearsAs it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
-
Kurtis Jungersen almost 2 yearsGlad it was helpful!
-
irfandar almost 2 yearsOr add a parent user of application pool identity
-
Murilo Maciel Curti almost 2 yearsThis happened here when migrating from .net 5 to .net 6