app.UseHealthChecks("/health"); works locally, does not work behind iis deployment.
i.e., localhost:8000/health shows "Healthy"
deployedip:8000/healthy gives 404 while the app itself is accessible at deployedip:8000
Is this a relative path issue? is the endpoint behind another path because it's deployed to iis? (deployedip:8000/appname/health)
4 Replies
I think it's only available from localhost (127.0.0.1 or ::1). You can allow more hosts tho:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-8.0#require-host
yea, i tried that also
it indeed matches the path provided
so the appname in url segment isn't matched and you 404
i deploy the app normally, it works fine. I deploy the app into a second iis site in a different app pool, with a different port, the healthcheck endpoint doesnt work