3

When I want to go module section in IIS I got this error.

enter image description here

And I also installed URL rewrite module. I know there is problem in web.config file but I don't understand where is the problem.

here is my web.config file

web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\RasaBack.dll"   
              stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
              hostingModel="InProcess" />
  <aspNetCore processPath=".\RasaBack.exe" stdoutLogEnabled="false"stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
    </system.webServer>
  </location>
</configuration>
Enigma
  • 77
  • 2
  • 10
  • Does this answer your question? [asp.net core web api published in IIS after moved to different IIS server pc gives error 500.19](https://stackoverflow.com/questions/49034308/asp-net-core-web-api-published-in-iis-after-moved-to-different-iis-server-pc-giv) – Lex Li Aug 02 '20 at 14:25

3 Answers3

6

Please make sure you have installed Dotnet core hosting bundle.

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-net-core-hosting-bundle

  • This. In my case I also needed to install https://www.iis.net/downloads/microsoft/url-rewrite because I had added a reference to the `rewrite` module. – Meekohi Jun 28 '21 at 15:28
1

To run the asp.net core site in iis you need to install the .net core hosting bundle and .NET Core Runtime.

you could download both the things from the below link based on your version:

https://dotnet.microsoft.com/download/dotnet-core

Jalpa Panchal
  • 8,251
  • 1
  • 11
  • 26
1

The error removed when I installed .net core husting bundle V3.1 showed me the full error. enter image description here

And I see I have two aspNetCore

 <aspNetCore processPath="dotnet" arguments=".\RasaBack.dll"    
              stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
              hostingModel="InProcess" />
  <aspNetCore processPath=".\RasaBack.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>

Then I removed on of those the error has gone.

Enigma
  • 77
  • 2
  • 10