Activities of "maliming"

hi

Please share the logs of this request.

Set minimum log level to Debug

        Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .Enrich.FromLogContext()
            .WriteTo.Async(c => c.File("Logs/logs.txt"))
            .WriteTo.Async(c => c.Console())
            .CreateLogger();

hi

You can share your project to liming.ma@volosoft.com

hi

Can you set the MinimumLevel to Debug?

Thanks.

Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Debug()
    .Enrich.FromLogContext()
    .WriteTo.Async(c => c.File("Logs/logs.txt"))
    .WriteTo.Async(c => c.Console())
    .CreateLogger();

hi

https://docs.abp.io/en/abp/latest/Connection-Strings

hi

You can share a simple project. liming.ma@volosoft.com

Answer

hi

These belong to the scope of SignalR, You can get sample code from its document.

hi

You can override the public virtual async Task<IActionResult> OnGetAsync() of the Login page.

This is the same as you click the Windows button.

public override async Task<IActionResult> OnGetAsync()
{
    var redirectUrl = Url.Page("./Login", pageHandler: "ExternalLoginCallback", values: new { ReturnUrl, ReturnUrlHash, });
    var properties = SignInManager.ConfigureExternalAuthenticationProperties("Windows", redirectUrl);
    properties.Items["scheme"] = "Windows";

    return await Task.FromResult(Challenge(properties, provider));
}

See the sign in code

https://github.com/search?q=repo%3Aabpframework%2Fabp%20ProcessWindowsLoginAsync&type=code

hi

There is no problem with your DruidAIUserManagement code.

Can you share a project?

hi

Please add these code to output the headers.

We have to attach the cookies to call the endpoint.

If there is no cookies, the HTML of login page will show up.

// Blazor server mode
client.BaseAddress = new Uri(NavigationManager.BaseUri);
foreach (var header in HttpContextAccessor.HttpContext!.Request.Headers)
{
    Logger.LogInformation("Header: {0} = {1}", header.Key, header.Value);
    requestMessage.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray());
}

hi

Let;s check what is the value of responseString

var responseString = await response.Content.ReadAsStringAsync();
Logger.LogInformation("Response: {0}", responseString);
return responseString;
[Dependency(ReplaceServices = true)]
public class MyBlazorServerLookupApiRequestService : ILookupApiRequestService, ITransientDependency
{
    public IHttpClientFactory HttpClientFactory { get; }
    public IRemoteServiceHttpClientAuthenticator HttpClientAuthenticator { get; }
    public IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; }
    public ICurrentTenant CurrentTenant { get; }
    public IHttpContextAccessor HttpContextAccessor { get; }
    public NavigationManager NavigationManager { get; }

    public ILogger<MyBlazorServerLookupApiRequestService> Logger { get; }

    public MyBlazorServerLookupApiRequestService(IHttpClientFactory httpClientFactory,
        IRemoteServiceHttpClientAuthenticator httpClientAuthenticator,
        ICurrentTenant currentTenant,
        IHttpContextAccessor httpContextAccessor,
        NavigationManager navigationManager,
        IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider,
        ILogger<MyBlazorServerLookupApiRequestService> logger)
    {
        HttpClientFactory = httpClientFactory;
        HttpClientAuthenticator = httpClientAuthenticator;
        CurrentTenant = currentTenant;
        HttpContextAccessor = httpContextAccessor;
        NavigationManager = navigationManager;
        RemoteServiceConfigurationProvider = remoteServiceConfigurationProvider;
        Logger = logger;
    }

    public async Task<string> SendAsync(string url)
    {
        var client = HttpClientFactory.CreateClient();
        var requestMessage = new HttpRequestMessage(HttpMethod.Get, url);

        var uri = new Uri(url, UriKind.RelativeOrAbsolute);
        if (!uri.IsAbsoluteUri)
        {
            var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultOrNullAsync("Default");
            if (remoteServiceConfig != null)
            {
                // Blazor tiered mode
                var baseUrl = remoteServiceConfig.BaseUrl;
                client.BaseAddress = new Uri(baseUrl);
                AddHeaders(requestMessage);
                await HttpClientAuthenticator.Authenticate(new RemoteServiceHttpClientAuthenticateContext(client, requestMessage, new RemoteServiceConfiguration(baseUrl), string.Empty));
            }
            else
            {
                // Blazor server  mode
                client.BaseAddress = new Uri(NavigationManager.BaseUri);
                foreach (var header in HttpContextAccessor.HttpContext!.Request.Headers)
                {
                    requestMessage.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray());
                }
            }
        }

        var response = await client.SendAsync(requestMessage);

        var responseString = await response.Content.ReadAsStringAsync();

        Logger.LogInformation("Response: {0}", responseString);

        return responseString;
    }

    protected virtual void AddHeaders(HttpRequestMessage requestMessage)
    {
        if (CurrentTenant.Id.HasValue)
        {
            requestMessage.Headers.Add(TenantResolverConsts.DefaultTenantKey, CurrentTenant.Id.Value.ToString());
        }

        var currentCulture = CultureInfo.CurrentUICulture.Name ?? CultureInfo.CurrentCulture.Name;
        if (!currentCulture.IsNullOrEmpty())
        {
            requestMessage.Headers.AcceptLanguage.Add(new(currentCulture));
        }
    }
}
Showing 7401 to 7410 of 12924 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on November 02, 2026, 06:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.