Closed EdwinThomas11 closed 5 months ago
@adamsitnik, @Jamie-Clayton Appreciate your help here.
Could you show screenshot from dev tools, network tab? I'm interested in contents of /healthchecks-api request
@dbarwikowski Please find the screenshot for your response
Thanks! Unfortunately it's not helpful :( One more think that might be a problem is https. Is your API setup to use it?
@dbarwikowski The issue was due to the authorization for https://localhost:5001/health. After whitelisting this URL, it worked as expected.
https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/issues/2255 -> Another ticket for reference. CC : @dbarwikowski
I've seen the other issue of yours. Is this still a problem?
Hello,
I hope you're doing well.
I'm working on implementing a health check in my application. Here are the changes I've made.
Here is the code in the startup.cs
services.AddHealthChecks() .AddSqlServer("MyConnectionString");
services .AddHealthChecksUI(s => { s.AddHealthCheckEndpoint("endpoint1", "https://localhost:5001/health"); }) .AddInMemoryStorage();
app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHealthChecksUI(); endpoints.MapHealthChecks("https://localhost:5001/health", new HealthCheckOptions() { Predicate = _ => true, ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse }); });
Here is the package references:
Here is the json health check:
Here is the health check UI:
I'm not sure why I'm encountering this error ("Unexpected character encountered while parsing value: <. Path '', line 0, position 0.") in the health check UI.
I would appreciate any help you can provide.
Regards, Edwin Thomas