Activities of "liangshiwei"

Hi,

You can check if the NET Core Runtime is installed on your server. https://learn.microsoft.com/en-us/dotnet/core/install/linux

Hi,

We will check it.

Hi,

Try removing Response.StatusCode = 403;

This is my code:

public ModelError Error { get; set; }

public class ModelError
{
    public string Message { get; set; }
}

public virtual async Task<IActionResult> OnGetAsync()
{
    try
    {
        throw new UserFriendlyException("A test message");
        UserInfo = new UserInfoViewModel();

        var roleDtoList = (await IdentityUserAppService.GetAssignableRolesAsync()).Items;

        Roles = ObjectMapper.Map<IReadOnlyList<IdentityRoleDto>, AssignedRoleViewModel[]>(roleDtoList);

        foreach (var role in Roles)
        {
            role.IsAssigned = role.IsDefault;
        }
    }
    catch (Exception e)
    {
        Error = new ModelError { Message = e.Message };
    }
    

    return Page();
}
<form method="post" asp-page="/Identity/Users/CreateModal">
    <abp-modal>
        <abp-modal-header title="@L["NewUser"].Value"></abp-modal-header>
        <abp-modal-body>
            @if (Model.Error != null)
            {
                <span>@Model.Error.Message</span>
            }
            else
            {
               .....
            }
            
    .......

Hi,

Can you share the full steps? thanks.

Hi,

Here is a sample you can check https://github.com/abpframework/abp/tree/dev/modules/blogging/app/Volo.BloggingTestApp.MongoDB

Hi,

System.Collections.Specialized is part of NET core runtime.

Can you try this?

dotnet publish -c release --os linux --self-contained

Hi,

You can add a custom message handler

public override void PreConfigureServices(ServiceConfigurationContext context)
{
    PreConfigure<AbpHttpClientBuilderOptions>(options =>
    {
        options.ProxyClientBuildActions.Add((s, builder) =>
        {
            builder.AddHttpMessageHandler<MyMessageHandler>();
        });
    });
}

public class MyMessageHandler : DelegatingHandler, ITransientDependency
{
    protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        request.Headers.Add(....);
        return base.SendAsync(request, cancellationToken);
    }
}

menus folder with the menucontributor and i followed your instructions, only permission work but it didn't appear any button or link in the menu. So if I want to apply permission on a button or link that already exists, what's the best way to do this? E.g. I want to apply a permission on the "My account" button (see the picture below)

Here I have explained how to hide link account, to hide my account we just have to do something like this: https://support.abp.io/QA/Questions/3741#answer-d4e39d0b-e9fe-2225-d96c-3a067a5828eb

public class MyProjectNameMenuContributor : IMenuContributor
{
    public async Task ConfigureMenuAsync(MenuConfigurationContext context)
    {
        //......
        if (context.Menu.Name == StandardMenus.User)
        {
            var linkedAccount = context.Menu.GetMenuItemOrNull("Account.Manage");
            linkedAccount?.RequirePermissions("<Your permission name>");
        }
    }
}

It still does not work for you, you can share the project with me via email, I will check it, shiwei.liang@volosoft.com

Hi,

This is a limit of OAuth: https://auth0.com/docs/get-started/authentication-and-authorization-flow/resource-owner-password-flow

I think the OAuth external login provider is not suite for you. you can custom your own provider.

Maybe Azure provides an HTTP API that can search users(I'm not sure.)

public class MyAzureAdExternalLoginProvider : ExternalLoginProviderBase, ITransientDependency
{
    public const string Name = "AzureAd";

    public MyAzureAdExternalLoginProvider()
            : base(....)
    {
    }

    public async override Task<bool> TryAuthenticateAsync(string userName, string plainPassword)
    {
        ....
    }
    
    public async override Task<bool> IsEnabledAsync()
    {
        .....
    }

    protected async override Task<ExternalLoginUserInfo> GetUserInfoAsync(string userName)
    {
        //Use the username to send an HTTP request to Azure API to query a user.
    }
}


Configure<AbpIdentityOptions>(options =>
{
    options.ExternalLoginProviders.Add<MyAzureAdExternalLoginProvider>(MyAzureAdExternalLoginProvider.Name);
});

We will fix the problem, and your ticket refunded.

Showing 4711 to 4720 of 6693 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.1.0-preview. Updated on November 07, 2025, 08:20