11

**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

Rinku Choudhary
  • 1,529
  • 1
  • 13
  • 22
  • 3
    Check 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. – jdweng Apr 28 '21 at 09:46
  • 1
    @jdweng I m not publishing. it's default nopcommerce 4.3 so i'm installing it on iis as a localhost – Rinku Choudhary Apr 28 '21 at 11:12
  • 1
    What 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. – jdweng Apr 28 '21 at 11:56
  • 1
    Yeah I'm Installing Nopcommerce 4.3 Project which is build in dot net core 3.1 on IIS – Rinku Choudhary Apr 29 '21 at 07:38
  • 1
    I think there is something wrong with Net 3.1.14 (see https://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 Apr 29 '21 at 09:37
  • It 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 : https://devblogs.microsoft.com/dotnet/net-core-april-2021-updates/?force_isolation=true – jdweng Apr 29 '21 at 09:39
  • Thanks @jdweng .Exactly it was my main issue.. – Rinku Choudhary May 01 '21 at 01:41

10 Answers10

6

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)

Fede
  • 141
  • 1
  • 6
4

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

You can download it from here.

Ayesh Silva
  • 88
  • 1
  • 6
4

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

Rinku Choudhary
  • 1,529
  • 1
  • 13
  • 22
2

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.

Kurtis Jungersen
  • 2,204
  • 1
  • 26
  • 31
2

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

Homer
  • 7,594
  • 14
  • 69
  • 109
Yash Lad
  • 21
  • 1
1

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.

  • As 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](/help/how-to-answer). – Community Jan 13 '22 at 00:00
1

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>
Prashant Agarwal
  • 729
  • 7
  • 23
1

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.
clamchoda
  • 4,411
  • 2
  • 36
  • 74
1

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!

Lemraj
  • 279
  • 3
  • 4
0

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

Vitaly Leskiv
  • 363
  • 3
  • 11