Activities of "maliming"

hi

Let me check it remotely. Thanks Join and share your screen. https://us05web.zoom.us/j/85451578578?pwd=vb4VkbCXwW0IIh2GaBAriuIHoG6g5c.1

ok, Please remove the logs.txt and restart the website, then share the logs again. Thanks

hi

System.IO.FileNotFoundException: Signing Certificate couldn't found: /var/www/ebiz/api/authserver.pfx

Please check the file.

MessageText: relation "AbpBackgroundJobs" does not exist

Have you change the TablePrefix ?

No problem

hi

Your logs file exists on Logs/logs.txt, Please check the publish folder of your website.

sorry, you can't do that in the LoggedOutModel class

Yes, you can't do that in the LoggedOutModel class

hi

You can't get user info in the LoggedOutModel class. so you can't output a username to security logs.

hi

We have output the log on LogoutModel. Why you are overriding the LoggedOutModel?

HI

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;

namespace BookStore;

public class MyRoleValidator : IRoleValidator<IdentityRole>
{

    public MyRoleValidator(IdentityErrorDescriber? errors = null)
    {
        Describer = errors ?? new IdentityErrorDescriber();
    }

    private IdentityErrorDescriber Describer { get; set; }


    public virtual async Task<IdentityResult> ValidateAsync(RoleManager<IdentityRole> manager, IdentityRole role)
    {
        if (manager == null)
        {
            throw new ArgumentNullException(nameof(manager));
        }

        if (role == null)
        {
            throw new ArgumentNullException(nameof(role));
        }

        var errors = new List<IdentityError>();
        await ValidateRoleName(manager, role, errors).ConfigureAwait(false);
        if (errors.Count > 0)
        {
            return IdentityResult.Failed(errors.ToArray());
        }
        return IdentityResult.Success;
    }

    private async Task ValidateRoleName(RoleManager<IdentityRole> manager, IdentityRole role, ICollection<IdentityError> errors)
    {
        var roleName = await manager.GetRoleNameAsync(role).ConfigureAwait(false);
        if (string.IsNullOrWhiteSpace(roleName))
        {
            errors.Add(Describer.InvalidRoleName(roleName));
        }
        else
        {
            // Add your custom validation here

            // var owner = await manager.FindByNameAsync(roleName).ConfigureAwait(false);
            // if (owner != null &&
            //     !string.Equals(await manager.GetRoleIdAsync(owner).ConfigureAwait(false), await manager.GetRoleIdAsync(role).ConfigureAwait(false)))
            // {
            //     errors.Add(Describer.DuplicateRoleName(roleName));
            // }
        }
    }
}

public class BookStoreDomainModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.RemoveAll(x => x.ServiceType == typeof(IRoleValidator<IdentityRole>));
        context.Services.AddScoped<IRoleValidator<IdentityRole>, MyRoleValidator>();
        //....
    }
}
Showing 6111 to 6120 of 11541 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 December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.