Reputation: 567
I recently published a .NET 8 Web API to IIS Windows server. At first I was getting errors showing
Failed to Load ASP.NET runtime
which I resolved by installing ASP.NET Core Runtime 8.0.5 Windows Hosting Bundle. Then the API seemed to be working fine.
The next day calling the API in Postman I got
404 Not Found
I've done the following:
Has anyone experienced this or know how to troubleshoot it?
Web.config
<?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="dotnet" arguments=".\SamadhiAPI.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: b7f93657-cfc6-4b8d-91d7-33f7e9e4960b-->
Upvotes: 1
Views: 530
Reputation: 567
Troubleshooting errors can be frustrating as often the error message is not in fact the cause of the problem. In my case, the intermittent behavior of the web service was caused by a conflicting subdomain DNS entry.
Upvotes: 1