Hallo
there are any news to this problem?
Regards
Hi
thats from the last exapmle
public static class AbpZeroHealthCheck { public static IHealthChecksBuilder AddAbpZeroHealthCheck(this IServiceCollection services) { var builder = services.AddHealthChecks(); // builder.AddCheck<BadgerMetaDbContextHealthCheck>("Meta Database Connection"); // builder.AddCheck<BadgerMetaDbContextUsersHealthCheck>("Database Connection with user check"); builder.AddCheck<CacheHealthCheck>("Cache");
//Und ACHTUNG the Name is unique!!!
// add your custom health checks here
// builder.AddCheck<MyCustomHealthCheck>("my health check");
// builder.AddCheck<BadgerAppDataDbContextHealthCheck>("App Database Connection");
// builder.AddCheck<BadgerMongoDbContextHealthCheck>("Mongo Database Connection");
return builder;
}
}
and this is a custom healtcheck class
namespace Badger.HealthChecks { public class BadgerAppDataDbContextHealthCheck : IHealthCheck { private readonly DatabaseCheckHelper _checkHelper;
public BadgerAppDataDbContextHealthCheck(DatabaseCheckHelper checkHelper)
{
_checkHelper = checkHelper;
}
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = new CancellationToken())
{
if (_checkHelper.Exist(BadgerConsts.AppDataConnectionStringName))
{
return Task.FromResult(HealthCheckResult.Healthy("BadgerAppDataDbContext connected to database."));
}
return Task.FromResult(HealthCheckResult.Unhealthy("BadgerAppDataDbContext could not connect to database"));
}
}
}
namespace Badger.HealthChecks { public class BadgerMongoDbContextHealthCheck : IHealthCheck { private readonly DatabaseCheckHelper _checkHelper;
public BadgerMongoDbContextHealthCheck(DatabaseCheckHelper checkHelper)
{
_checkHelper = checkHelper;
}
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = new CancellationToken())
{
if (_checkHelper.Exist(BadgerConsts.MongoDbConnectionStringName))
{
return Task.FromResult(HealthCheckResult.Healthy("BadgerMetaDbContext connected to database."));
}
return Task.FromResult(HealthCheckResult.Unhealthy("BadgerMetaDbContext could not connect to database"));
}
}
}
Regards
Hi
I upgrade the NuGet packages but the same problem.
In my initial request I push a screen from an Insomia post request, and on this I get a Unauthorized error. Why that or how can I fix this problem?
We test it with 2 Server, on the Test Server it works on the Prod Server doesn't work. The reason is on Test Server, the IIS Authentication -> Anonymous Authentication is enabled and on the other Server not. But we not allow Anonymous Authentication.
You have a solution for this problem?
Regards
HI
we use the 12.1.0 / Core MVC & JQuery
Regards
Hi
I am getting an exception due to HealthChecks Ui. The Json Api Health works fine.
Regards
ERROR 2023-11-06 10:04:53,513 [11 ] HostedService.HealthCheckReportCollector - GetHealthReport threw an exception when trying to get report from https://localhost:44302/health configured with name Badger.Web.MVC.
System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.ReadFromStreamAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 126
Update and my Insomnia has this error.
Hi
how can I implement SSO with Kestrel? I use this documentation, but it doesn't work. https://learn.microsoft.com/de-de/aspnet/core/security/authentication/windowsauth?view=aspnetcore-7.0&tabs=visual-studio
Regards
Yes thanks
Hi
that's nice your links but we don't use angular, we are using MVC. And in MVC is the structure others. And when I read right, then is the problem in your links not the same. In my project works the menu fine when is expand, it doesn't work when the menu is collapse and then I while click on a item whit sub items. And you can replicate this bug, on your own demo project (I wrote this info in my first statement).
Regards
Hi the sub items from the menu doesn't shows correctly when the menu is minimized. http://c1c74570.demo.aspnetzero.com/app/main/dashboard In your demo it this effekt also, minimize the menu that you can see only the icons and the click on the administration icon. Shortly there are open the sub items but then are close automatically.
And the Quick Nav Bar shows not fine.
Ragards