0

Im trying to host a self contained ASP.NET core application on IIS. I managed to publish my files using Visual Studio, but when I try to access my application from the browser I get this error:

enter image description here

This is my 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="OsuIndexerWeb\OsuIndexerWeb.exe"
                  stdoutLogEnabled="false"
                  stdoutLogFile=".\logs\stdout"
                  hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

For some reason IIS seems to fail to read the config file, I'm assuming this since the "Config Source" section in the error page is empty. Yes the web.config is there, if I copy the path from the error page and paste it in the browser it works.

  • 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 Jun 12 '21 at 14:40

1 Answers1

1

Fixed it by installing ".NET 5.0 Hosting Bundle"