Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HealthCheck 3.1.3: Change services.AddHealthChecksUI() to services.AddHealthChecksUI().AddInMemoryStorage() #22

Open
biapar opened this issue Nov 23, 2020 · 3 comments

Comments

@biapar
Copy link

biapar commented Nov 23, 2020

If you upgrade HealthCheck to 3.1.3

you have to change the class class RegisterHealthChecks : IServiceRegistration

string DbConnectionString = config.GetConnectionString("HealthCheckDatabaseConnectionString");
services.AddHealthChecksUI().AddInMemoryStorage();
//.AddSqliteStorage(DbConnectionString);

@improwise
Copy link

Is the DB file actually ever used? Can't see that HealthCheckDatabaseConnectionString is ever used (but still cause an error if left remaining in the appsettings.json, so maybe its some indirect loading).

@biapar
Copy link
Author

biapar commented Nov 25, 2020

The HealthCheckDatabaseConnectionString was the original.

@improwise
Copy link

improwise commented Nov 25, 2020

Yes, but it does not seem to be used in the original code?

https://github.com/proudmonkey/ApiBoilerPlate/blob/master/ApiBoilerPlate/Infrastructure/Installers/RegisterHealthChecks.cs

Edit:

Seems like the DB is created on startup if it does not exist using the HealthCheckDatabaseConnectionString, if not present in appsettings, default name will be used. Probably nothing specific for this project though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants