Activities of "liangshiwei"

Getting error : The property 'IdentityUser.IsActive' could not be found. Ensure that the property exists and has been included in the model.

See https://docs.abp.io/en/abp/latest/Entity-Framework-Core#mapefcoreproperty

My debugger didn't even hit this LitmusUserValidator ValidateAsync method while logging in

Try Put to PreConfigureServices

Hi,

I have test, you can try SeedDataAsync method in the <YourProjectName>DbMigrationService and replace it with the following code:

private async Task SeedDataAsync(Tenant tenant = null)
{
    Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");

    using (var uow = _unitOfWorkManager.Begin(true, true))
    {
        await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
            .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
            .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
        );

        await uow.CompleteAsync();
    }
}

Hi,

You can try use CultureInfo.CurrentUICulture.

Hi,

Because this qustion has not been active for a long time, system will automatically close it.

Is there a way where I find one item of this list and want to update its "PropertyAdded" column. How do I do this ?

I think the document it clear, you can check it: https://docs.abp.io/en/abp/latest/Object-Extensions#setproperty

Is there any abp.io document where implementation of UserValidator class is provided ? Can you provide me sample of this class ? And how can I find my custom column here ?

Example:

public class MyUserValidator<TUser> : IUserValidator<TUser> where TUser : Volo.Abp.Identity.IdentityUser
{
    private readonly IIdentityUserRepository _userRepository;

    public MyUserValidator(IIdentityUserRepository userRepository)
    {
        _userRepository = userRepository;
    }

    public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user)
    {
        //....
    }
}


PreConfigure<IdentityBuilder>(builder =>
{
    builder.AddUserValidator<MyUserValidator<Volo.Abp.Identity.IdentityUser>>();
});

In the below code there is one option called options.SignIn.RequireConfirmedEmail If I would able to find my added column here I think it will resolve my issue.

No you can't

Hi,

It works for me.

public class IndexModel : AbpPageModel
{
    public void OnGet()
    {
        throw new Exception("test");
    }
}
app.UseExceptionHandler(x => x.Run(async errorContext =>
{
    errorContext.Response.StatusCode = (int) HttpStatusCode.InternalServerError;
    errorContext.Response.ContentType = "text/html";

    await errorContext.Response.WriteAsync("<html lang=\"en\"><body>\r\n");
    await errorContext.Response.WriteAsync("ERROR!<br><br>\r\n");

    var exceptionHandlerPathFeature =
        errorContext.Features.Get<IExceptionHandlerPathFeature>();

    if (exceptionHandlerPathFeature?.Error is FileNotFoundException)
    {
        await errorContext.Response.WriteAsync(
            "File error thrown!<br><br>\r\n");
    }

    await errorContext.Response.WriteAsync(
        "<a href=\"/\">Home</a><br>\r\n");
    await errorContext.Response.WriteAsync("</body></html>\r\n");
    await errorContext.Response.WriteAsync(new string(' ', 512));
}));

Could you share a project to reproduce it? shiwei.liang@volosoft.com

Hi,

You can do it,

Change requireHttps to false

Hi

what should i do, to automatically seed the database when i create a tenant?

It is already like this, you can see MyProjectNameTenantDatabaseMigrationHandler in your domain project.

Hi,

When we add the module Lepton.Themes,

Lepton theme is pre-installed, but I will try reproduce it. it will be helpful if you can provide steps to reproduce. thanks.

Hi

And while fetching roles via. RoleRepository.GetListAsync() suppose I want roles only specific for CatA.

Yes you can do this, there are two ways:

  1. Filter the memory list
var users = (await _userRepository.GetListAsync()).Where(x => x.GetProperty<int>("PropertyAdded") == 1).ToList();
  1. Use EF Core API

see : https://docs.abp.io/en/abp/latest/Entity-Framework-Core#access-to-the-ef-core-api

var users = (await _userRepository.GetDbSetAsync()).Where(x => EF.Property<int>(x, "PropertyAdded") == 1).ToListAsync();

How can I achieve this and where to do respective changes.

You can use the IUserValidator

See https://github.com/abpframework/abp/issues/3990

Showing 5601 to 5610 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 December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.