Web Farm with IIS10 Servers | Content Server: HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process)

Nasheayahu 40 Reputation points
2023-10-30T17:57:44.8933333+00:00

My goal was to put all ASP.NET core content on a Content Server and found "Build a Web Farm with IIS Servers" learning document showing how to do this, but I've ran into a problem. I'm running 5 KVM Windows 2019 Essential VMs (ARR, Content, Certificate, Web1, Web2) Servers.

Testing the Blazor App on Web1 I get the,

  • Browser: HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process)

and viewing the Windows Logs | Application

  • Failed to start application '/LM/W3SVC/1/ROOT', ErrorCode '0x8007023e'.
  • Application '\CONTENTSERVER\wwwroot\kohanyim' failed to start. Exception message: Unexpected exception: status: Access is denied.: "\CONTENTSERVER\wwwroot\kohanyim\dotnet.exe"

I thought this would have taking care of that:

cd %windir%\Microsoft.NET\Framework64\v4.0.30319
caspol -m -ag 1. -url file://CONTENTSERVER/wwwroot/kohanyim/* FullTrust

So, how do I correct this?

UPDATE: web.conf

<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\BlazorAppKohanyim.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>
Windows development | Internet Information Services
Developer technologies | ASP.NET | ASP.NET Core
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.