I have .Net Web Api that has been running for some time on client Windows 2022 Sever under IIS10. It uses AspNetCoreModuleV2 host module. Now client has uninstalled ASP NET Core 2.2 Host bundle that provided AspNetCoreModuleV2 due to End Of Life condition and has asked to migrate Api to use .NET8.
I have created NET8 version of Api. The NET8 runtime and host bundle has been installed on server. With uninstall of Core 2.2 Host bundle, both Api versions are not running. In IIS Web Site->IIS Authentication or Configuration Editor throws error - There was an error while performing operation. If I run Api and open URL in browser, it gives error - HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. My Web Config for both versions is below.
I have tried with App Dll name in processPath="dotnet" arguments=".<>.dll" for NET8 version but nothing works. Event Viewer does not have any errors.
What host module can I use to resolve this? Does NET8 install provides host module other than AspNetCoreModuleV2 ?
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="<web api>.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>