.Net Core module not started from IIS, only from command line

  .net, asp.net-core-3.1, iis, web-config, windows

I am deployinng a .Net app through IIS running on Windows 10. Web.config is processed properly and IIS does not report any issue with it. However the aspnetcore module is not started and I cannot browse through the site.
If I run dotnet dllname from the command line then my site works properly. This has been a frustrating endeavor. THe IIS logs don’ t provide any clue as to why IIS cannot start the site as dotnet does from the command line. Trying to enable aspnetcore enhanced tracing does not do anything. Here is my web.config:

 <location path="." inheritInChildApplications="false">
       <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
     <aspNetCore processPath="c:Program Filesdotnetdotnet.exe" arguments="c:escompdata2ESTemplateCompData.dll" stdoutLogEnabled="true" stdoutLogFile=".logsstdout" hostingModel="inprocess" >
         <handlerSetting name="debugFile" value=".logsaspnetcore-debug.log" />
         <handlerSetting name="debugLevel" value="FILE,TRACE" />
               <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                   <match url="(.*)" />
                   <action type="Rewrite" url="http://escompdata:5000/{R:1}" />

My app pool does have the proper permission. I am using the admin ID with the proper credential. Here is a screenshot of the app pool basic settings
enter image description here

Here is a screenshot of the advanced settings
enter image description here
I am setting a reverse proxy for my site and when the dotnet app is launched from the command line, IIS is hitting it fine which seems to indicate that the site is at least set up properly in IIS.

The problem is that IIS does not seem to be able to launch the app neither via dotnet nor with the app executable. I have not tried the out or process mode with the Kestrel server but this is a puzzling piece. IIS does not seem able to yield any clue via the logs. Any help would be tremendously appreciated.

Source: Windows Questions