Activities of "lan.dang"

Thank you, I solved the error : this method in azure app service does not work well {Dns.GetHostName()}

  • ABP Framework version: v8.0.1
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I got this error in Host app 2024-04-18 02:15:02.991 +00:00 [ERR] GetHealthReport threw an exception when trying to get report from http://a7fe589a2946/health-status configured with name DruidAI Health Status. System.Net.Http.HttpRequestException: Connection refused (a7fe589a2946:80) ---> System.Net.Sockets.SocketException (111): Connection refused at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.

This is my HealthCheck configure public static class HealthChecksBuilderExtensions { public static void AddDruidAIHealthChecks(this IServiceCollection services) { // Add your health checks here var healthChecksBuilder = services.AddHealthChecks(); healthChecksBuilder.AddCheck

    services.ConfigureHealthCheckEndpoint("/health-status");
    
    // If you don't want to add HealthChecksUI, remove following configurations.
    var healthChecksUiBuilder = services.AddHealthChecksUI(settings =>
    {
        settings.AddHealthCheckEndpoint("DruidAI Health Status", $"http://{Dns.GetHostName()}/health-status");
    });
    
    // Set your HealthCheck UI Storage here
    healthChecksUiBuilder.AddInMemoryStorage();
    
    services.MapHealthChecksUiEndpoints(options =>
    {
        options.UIPath = "/health-ui";
        options.ApiPath = "/health-api";
    });
}

private static IServiceCollection ConfigureHealthCheckEndpoint(this IServiceCollection services, string path)
{
    services.Configure<AbpEndpointRouterOptions>(options =>
    {
        options.EndpointConfigureActions.Add(endpointContext =>
        {
            endpointContext.Endpoints.MapHealthChecks(
                new PathString(path.EnsureStartsWith('/')),
                new HealthCheckOptions
                {
                    Predicate = _ => true,
                    ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse,
                    AllowCachingResponses = false,
                });
        });
    });

    return services;
}

private static IServiceCollection MapHealthChecksUiEndpoints(this IServiceCollection services, Action<global::HealthChecks.UI.Configuration.Options> setupOption = null)
{
    services.Configure<AbpEndpointRouterOptions>(routerOptions =>
    {
        routerOptions.EndpointConfigureActions.Add(endpointContext =>
        {
            endpointContext.Endpoints.MapHealthChecksUI(setupOption);
        });
    });

    return services;
}

}

It seems error on Dns.GetHostName() as I return "a7fe589a2946", right? can i get host name from Configuration app setting?

Thank you, it worked

  • ABP Framework version: v8.1.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello, I take care project from Christope This solution works with ABP 7.0.0 https://support.abp.io/QA/Questions/1490/Adding-project-VoloAbpMultiTenancy-from-Github-into-ABP-solution But I got this error after upgrade ABP to 8.1.0 ArgumentException: The type 'Kwork.StaffApp.CustomSource.MyTenantConfigurationProvider' is not assignable to service 'Volo.Abp.Identity.IdentityUserManager'. How can I make it works? I tried to add but it does not solve the error context.Services.Replace( ServiceDescriptor.Transient<ITenantConfigurationProvider, MyTenantConfigurationProvider>() );

Thank you, this solution seems work for me BTW, I added to OnAfterRenderAsync protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { //Temporary solution to clear session storage if (Page == "/Account/~/Account/Login") { await jsRuntime.InvokeVoidAsync("sessionStorage.clear"); } } await base.OnAfterRenderAsync(firstRender); }

@Anjali_Musmade do you have any other idea? Thanks

As I mentioned, it raises error InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.

There is no method OnAfterRenderAsync in LogoutModel to overwrite

It does not work for me, if using sessionStorage.Clear(), I cannot call it from OnGetAsync method in LogoutModel

  • ABP Framework version: v8.0.0
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue: How can I clear all session storage after logout? ISessionStorage does not allow in LogoutModel as we need to implement it in OnAfterRender

Thank a lot , it solves my requirement

Showing 1 to 10 of 125 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11