Search code examples
http-status-code-404.net-8.0azure-functions-isolated

What can I troubleshoot next to figure out why I get 404 messages?


I had a .NET 6 in-process Azure function that was working fine.

I migrated it to .NET 8 isolated.

  • It works locally
  • It works locally in Docker
  • It deploys to a development environment in our AKS cluster without issue
  • I am able to hit the root page in that environment which tells me the function is running

However, requests to the http triggered function in the project returns a 404. Just to reiterate:

  • These requests previously worked in dev environment before migrating to .NET 8 isolated
  • These requests still work locally in .NET 8 isolated, whether in or out of Docker
  • A request to the root page in the dev environment still returns the "Your Functions 4.0 app is up and running" message along with the big smiley :-) that winks at you ;-)

Since the code all works locally (in or out of Docker), and since I have verified that I can hit the function and it is running, where might I even look next to troubleshoot further?

We do use DataDog, but basically the only information I got there was the fact that a request came in and a 404 was returned.

What other factor(s) could be disrupting the routing?


Solution

  • I don't know if you are using Application Insights to also log requests and telemetry in general, but that is definitely what we would check in our projects when we have scenarios like this. Eventually, you will be able to see exactly what are the requests causing a 404 and compare to your http trigger endpoint.

    Microsoft documentation on how to add Application Insights to .net projects to be deployed to AKS: https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew