Activities of "maliming"

Remove dummyClientSecret in angular And unset the secret of the client.

Answer

hi

You can add a new Hub and add a new service like SignalRTypingMessageSender(SignalRRealTimeChatMessageSender)

In angular side. Send the request to API when the user is typing. And the API uses SignalRTypingMessageSender to send the messages to users.

hi

You can remove the client_secret from the application/client.

Your angular client should be a public application.

https://auth0.com/docs/get-started/applications/confidential-and-public-applications

Please enable the WebSocket feature in your Azure server.

hi

Let me check it on the azure website.

And share your logs.txt again. Thanks.

Answer

hi

You better download the source code of the Chat module to customize your new feature.

There are some services in the Signalr module.

hi

Please add the MyBlazorServerLookupApiRequestService to your blazor project and try again. The error logs will show the reason.

After the above test, you can add RemoteServices to your appsettins.json

  "RemoteServices": {
    "Default": {
      "BaseUrl": "https://your-real-url-dev.azurewebsites.net/"
    }
  },

Thanks.

using System;
using System.Globalization;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Volo.Abp;
using Volo.Abp.AspNetCore.Components.Web.Extensibility;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.Authentication;
using Volo.Abp.MultiTenancy;

namespace Metro.Blazor;

[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)
    {
        Logger.LogError("SendAsync: {url}", url);

        var client = HttpClientFactory.CreateClient();
        var requestMessage = new HttpRequestMessage(HttpMethod.Get, url);

        var uri = new Uri(url, UriKind.RelativeOrAbsolute);
        if (!uri.IsAbsoluteUri)
        {
            Logger.LogError("SendAsync: {url} is not absolute uri", url);

            var baseUrl = string.Empty;
            try
            {
                //Blazor tiered -- mode
                var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync("Default");
                baseUrl = remoteServiceConfig.BaseUrl;

                Logger.LogError("Blazor tiered -- mode: {baseUrl}", baseUrl);

                client.BaseAddress = new Uri(baseUrl);
                AddHeaders(requestMessage);
                await HttpClientAuthenticator.Authenticate(new RemoteServiceHttpClientAuthenticateContext(client,
                    requestMessage, new RemoteServiceConfiguration(baseUrl), string.Empty));
            }
            catch (AbpException e) // Blazor-Server mode.
            {
                Logger.LogError(e, "AbpException: {message}", e.Message);

                baseUrl = NavigationManager.BaseUri;

                Logger.LogError("AbpException Blazor tiered -- mode: {baseUrl}", baseUrl);

                client.BaseAddress = new Uri(baseUrl);
                foreach (var header in HttpContextAccessor.HttpContext!.Request.Headers)
                {
                    requestMessage.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray());
                }
            }
        }

        var response = await client.SendAsync(requestMessage);
        return await response.Content.ReadAsStringAsync();
    }

    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));
        }
    }
}

System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Volo.Abp.AspNetCore.Components.Server.Extensibility.BlazorServerLookupApiRequestService.SendAsync(String url)
   at Volo.Abp.BlazoriseUI.Components.ObjectExtending.LookupExtensionProperty`2.GetLookupItemsAsync(String filter)
   at Volo.Abp.BlazoriseUI.Components.ObjectExtending.LookupExtensionProperty`2.SearchFilterChangedAsync(String filter)
   at Volo.Abp.BlazoriseUI.Components.ObjectExtending.LookupExtensionProperty`2.OnAfterRenderAsync(Boolean firstRender)
   --- End of inner exception stack trace ---

hi

You also need to configure the Windows authentication.

Services.AddAuthentication

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth

hi

We will check this ASAP.

Many thanks.

Showing 7411 to 7420 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.