Reed
Reed

Reputation: 1642

Malformed web.config file aspNetCore node causing issues

Using IIS 10 and .NET Core 2.0

The web.config was generated from a new .NET Core MVC project.

<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>      
    <aspNetCore processPath="dotnet" arguments=".\MvcMovie.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
  </system.webServer>
</configuration>

With it in this configuration I can't open the configuration editor in IIS and gives a 500.19 error:

Config Source:
   -1: 
    0: 

If I remove the <aspNetCore /> node, it will open in the configuration editor in IIS but will give a 500.21 error:

Handler "aspNetCore" has a bad module "AspNetCoreModule" in its module list

What would I do to get about fixing this?

Upvotes: 1

Views: 1255

Answers (1)

Gabriel Luci
Gabriel Luci

Reputation: 40928

It sounds like you haven't installed the IIS Hosting bundle.

Go here: https://www.microsoft.com/net/download/all

Click the version of ".NET Core Runtime" that you need, then download the "Hosting Bundle Installer" under "Windows".

Upvotes: 3

Related Questions