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,
HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process)
and checking the Windows Logs | Application I get,
Failed to start application '/LM/W3SVC/1/ROOT', ErrorCode '0x8007023e'.
I cloned all 4 other servers from my ARR server, remove IIS from the Content / Certificate servers, so all have the same DOTNET version and dependencies. Before testing the Blazor App I just had the default IIS web content and it worked fine.
The Blazor content is published as:
to the Content Server folder as:
the dotnet version installed in all servers is:
ran this as well on all servers:
on the Content Server I ran this and the Blazor App displayed in the browser successfully:
So this brings me to this question, can Blazor content be loaded from a Shared folder, if so what other settings do I need to correct to get this working?
UPDATE:
After reading up to @Lemraj in the provided link by @Ken Lee, I did not think to check the error before my posted one with the same time stamp:
I'm getting a permission denied on executing dotnet.exe. How do I correct this, do I need to add the absolute path in my web.config or environment? The dotnet.exe is not published with the project.
I thought this would've taking care of the permission:
cd %windir%\Microsoft.NET\Framework64\v4.0.30319
caspol -m -ag 1. -url file://CONTENTSERVER/wwwroot/kohanyim/* FullTrust
You can see this error for IIS AspNetCore Module V2 in the event viewer, it is a permissions issue.
Please open IIS Manager >> Select the application pool used by your site >> Click "Advanced Settings" in the right action pane >> Check "Identity" under the "Process Model" section. By default it is set to "ApplicationPoolIdentity", which should be the recommended setting.
Then right click on the "wwwroot\kohanyim" folder (or whatever folder event viewer is complaining about) >> Select "Properties" >> Go to "Security" tab >> Click "Edit" to adjust permissions >> Add the appropriate application pool identity as a user with permissions.