Hi @Jorge Germano ,
Thanks for sharing your details!
The error you are seeing:
Unable to get required configuration section 'system.webServer/aspNetCore'. Possible reason is web.config authoring error.
From my understanding, this usually means IIS cannot interpret the <aspNetCore> section in web.config.
I would recommend you try these workarounds first:
1. Repair or install the .NET 8 Hosting Bundle
The Hosting Bundle for .NET 8 might not be installed properly or needs repair so you can try to download and run the Hosting Bundle installer again, then restart your server.
2. Verify ANCM V2 is present in IIS
The ASP.NET Core Module (ANCM) V2 might also not be installed or registered correctly. IIS needs this module to process ASP.NET Core apps.
In IIS Manager → Modules, confirm AspNetCoreModuleV2 exists. Also check C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll.
Reference: ASP.NET Core Module (ANCM) for IIS
3. Set Application Pool to No Managed Code
In IIS Manager → Application Pools → Your pool → .NET CLR Version = No Managed Code.
4. Match processPath to your deployment type
The web.config you shared is structurally correct for an ASP.NET Core app hosted in IIS with the in‑process model. If you published:
- Self-contained: keep
.exeinprocessPath. - Framework-dependent: switch to
processPath="dotnet"with the.dllinarguments.
Reference: Configuration of ASP.NET Core Module with web.config
5. Create and permission the logs folder
Ensure the folder exists and grant Modify rights to IIS_IUSRS and the app pool identity.
Reference: Troubleshoot ASP.NET Core on IIS
There are also other posts that go more in-depth to these troubleshooting steps, I highly recommend you check them out for better understanding of this issue:
- https://stackoverflow.com/questions/62194917/hosting-a-net-core-application-in-iis-could-not-load-configuration-attribute
- https://stackoverflow.com/questions/63719769/500-error-unable-to-get-required-configuration-section-system-webserver-aspne
Disclaimer: Some of these links are from third-party websites and not from Microsoft official documentation so use them for information only. Please do not click or download any strange pop-ups that you might encounter.
Hope this helps! If you have any questions left, please comment below. I'll be happy to help out!