500 error : Unable to get required configuration section 'system.webServer/aspNetCore'

0

I have an internal server error at my .netcore web-service launch. Tuesday morning, the web-service was lauching well, Tuesday afternoon a windows update has been installed (KB4570720 package), Wednesday I have this 500 error...

The IIS error page tell me :

  • Module AspNetCoreModuleV2
  • Notification ExecuteRequestHandler
  • Gestionnaire aspNetCore
  • Code d'erreur 0x80004005

And IIS log event has this specific error :

Could not load configuration. Exception message: Unable to get required configuration section 'system.webServer/aspNetCore'. Possible reason is web.config authoring error.

This my web.config, I don't see what's wrong.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.webServer>
        <handlers>
          <remove name="aspNetCore" />
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
        </handlers>
        <aspNetCore processPath="dotnet" arguments=".\loemail.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">
           <environmentvariables />
        </aspNetCore>
            <httpErrors errorMode="Detailed" />
      </system.webServer>
    </configuration>
  • I have tried to change the encoding from UTF8 to ANSI.
  • I've tried to change the stdoutLogEnabled from false to true but there is no error there since it occurs before.
  • I've tried to remove completely the web.config and copy-paste the one from my backup.
  • I've tried to reinstall the web-service.

I have another .netcore application running on this server, so I excluded issues with the .net framework version but maybe I'm wrong ? How could I check that ? Both uses 2.2 .Net Framework.

Should I remove the last windows update package ?

I take any ideas ;) Thanks !

asp.net-core
iis-10
window-server
asked on Stack Overflow Sep 3, 2020 by ordiminnie

1 Answer

0

I fix the problem by copy/paste the web.config from my other application... And I still see no difference between them ! Computer makes us crazy sometimes...

answered on Stack Overflow Sep 3, 2020 by ordiminnie

User contributions licensed under CC BY-SA 3.0