1

I'm trying to deploy new asp.net core 5 (5.0.100-rc.1.20452.10) app to IIS on Win 10 and Windows Server 2019.

I've deployed the app using Visual Studio to Default Web Site with ApplicationPoolIdentity and granted full access permission to both "IIS_IUSRS" and "Everyone".

I'm still getting:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

When I try to open the config in IIS Manager I get "Data is invalid" error:

iis manager error

The webconfig looks pretty normal:

<?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=".\MyApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

I think I've installed all IIS Features:

windows features

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Liero
  • 25,216
  • 29
  • 151
  • 297
  • Does this answer your question? [asp.net core web api published in IIS after moved to different IIS server pc gives error 500.19 (0x8007000d)](https://stackoverflow.com/questions/49034308/asp-net-core-web-api-published-in-iis-after-moved-to-different-iis-server-pc-giv) – Lex Li Oct 15 '20 at 18:07

1 Answers1

1

I had the same issue, while deploying net core 6 application.

I gave the IUSR and IIS_IUSR permissions. I installed the URL rewrite extension.

The thing finally saved me was I checked for if net core hosting was installed on my system, we can verify in system registry under:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Updates.NET Core path like screenshot below. Registry image

And I fixed it after downloading the hosting module: .Net hosting bundle

And now the settings and application works fine.

mohammadAli
  • 375
  • 2
  • 13