I'm using the healthCheck to verify the state of the services but I have an error when this service is in IIS.
In ConfigureServices:
services.AddHealthChecksUI(s =>
{
s.AddHealthCheckEndpoint("Validations", "/CheckPoints");
}).AddInMemoryStorage();
services.AddHealthChecks();
In Configure
builder.MapHealthChecksUI(setupOptions: setup =>
{
setup.UIPath = "/CheckPointsUI";
});
builder.MapHealthChecks("/CheckPoints", new HealthCheckOptions()
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
builder.MapHealthChecks("/Status");
When I run the service in localhost all works good but the same code in IIS pool I have the next error:
An invalid request URI was provided. The request URI must either be an absolute URI or BaseAdress must be set
I don't know why it behaves differently.