Activities of "liangshiwei"

Is it possible to override an AppService and modify its logic without rewriting the entire module?

Yes, of course you can, for example:

[ExposeServices(typeof(ITenantAppService))]
[Dependency(ReplaceServices = true)]
public class MyTenantAppService : TenantAppService
{
    public MyTenantAppService(ITenantRepository tenantRepository, IEditionRepository editionRepository, ITenantManager tenantManager, IDataSeeder dataSeeder, IDistributedEventBus distributedEventBus, IOptions<AbpDbConnectionOptions> dbConnectionOptions, IConnectionStringChecker connectionStringChecker) : base(tenantRepository, editionRepository, tenantManager, dataSeeder, distributedEventBus, dbConnectionOptions, connectionStringChecker)
    {
    }

    public override Task<SaasTenantDto> CreateAsync(SaasTenantCreateDto input)
    {
        input.ConnectionStrings = new SaasTenantConnectionStringsDto
        {
            Databases = new List<SaasTenantDatabaseConnectionStringsDto>
            {
                new SaasTenantDatabaseConnectionStringsDto {
                    ConnectionString = "...",
                    DatabaseName = "Default"
                }
            }
        };
        return base.CreateAsync(input);
    }
}

Hi,

There is a possibility that you have multiple environments, qa, development, production, etc.

And maybe they used the same URL when sending the reset link email,

Hi,

I didn't see any error in the browser, Is this error only in the log?

Maybe I didn't understand your question well

Hi,

Because you have the source code, you can modify the source code directly.

For exmaple, add a method to IFileDescriptorRepository to get all items by filter:

    public virtual async Task<List<FileDescriptor>> GetAllListAsync(
        string filter = null,
        string sorting = null,
        int maxResultCount = int.MaxValue,
        int skipCount = 0,
        CancellationToken cancellationToken = default)
    {
        return await (await GetDbSetAsync())
            .WhereIf(!string.IsNullOrWhiteSpace(filter), x => x.Name.Contains(filter))
            .OrderBy(sorting.IsNullOrWhiteSpace() ? FileDescriptorConsts.DefaultSorting : sorting)
            .PageBy(skipCount, maxResultCount)
            .ToListAsync(GetCancellationToken(cancellationToken));
    }

And use it in the appservice.

Hi, the link looks fine.

You mean forward you an email password reset email from our test instance? Sure, I can do that.

Sorry, I mean, can you add a test user whose email is shiwei.liang@volosoft.com?

Hi,

Could you share the full app logs? thanks

Hi,

I can reproduce the problem, I will check it.

We isolated the problem to a small change we recently made. We changed the APB setting value of the mail send from address (Abp.Mailing.DefaultFromAddress) to a new value. This single change caused the exception. When we revert the send from mail address to its original value, everything works as expected.

You mean that after reverting the change, the PasswordResetLinkSet page will not be automatically redirected, right?

I checked the source code, page does not contain automatic redirection code, have you customized the page?

BTW, could you provide a test email to me? I want to test it. thanks

Hi,

Could you share a project that can reproduce the problem with me? I will check it out. shiwei.liang@volosoft.com

You can replace the IGuidGenerator service.

For example:

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IGuidGenerator))]
public class MyGuidGenerator : IGuidGenerator, ITransientDependency
{
    public virtual Guid Create()
    {
        return Guid.NewGuid();
    }
}

You need to use the DisableIdGenerationAttribute

3.

For example:

public class MyEntity : AggregateRoot<Guid>
{
    [DisableIdGeneration]
    public override Guid Id { get; protected set; }
}
Showing 3361 to 3370 of 6692 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 15, 2025, 14:41