I'm trying to host a .net Core API in IIS. When I have it running in Visual Studio everything is working correctly. For deployment I first published the project to a folder, copied the contents to the desired location and created an application in IIS. It is set to use an application Pool thats cofigured with "No managed code".
When I try calling one of the available Endpoints (through the frontend or manually) I receive an http 500 Error (Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.)
I can't find any meaningful logs on the Server. Only in the Event Viewer could I find an Error event.
"Could not load configuration. Exception message: Attribute 'processPath' is required."
Now im not sure why this would be the case because the processPath attribute in the Web.config of the project is definitely present and is generated like this when publishing. It looks like:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\MyApplication.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
</location>
</configuration>
The core Hosting Bundle is installed. A complete restart isn't really viable on this server (or at least I want to avoid it). For that reason I ran
net stop was /y
net start w3svc
to pick up on any changes made.
I'll be happy about any ideas and advice on how to resolve this. Thanks a lot in advance!