Open Closed

Confirm Email link for new user from tenant side give error #4989


User avatar
0
hardip created
  • ABP Framework version: v7.1
  • UI type:Blazor
  • DB provider: EF Core
  • **Tiered (MVC) **: yes
  • Exception message and stack trace: 404 Page not found. There is no entity IdentityUser with id = 3a0aeddd-c241-6619-17e4-c64fd1017f7f!
  • Steps to reproduce the issue:" Creating user from tenant side, the confirm email link gives the error : 404 Page not foundThere is no entity IdentityUser with id = 3a0aeddd-c241-6619-17e4-c64fd1017f7f!

When creating new user from the Host side the confirm email link works fine, but creating user from tenant side, the confirm email link does not work and gives the error

404 Page not foundThere is no entity IdentityUser with id = 3a0aeddd-c241-6619-17e4-c64fd1017f7f! \

Using the abp.io default components, does not extend/modify the account or user components.

refer :


10 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will confirm it.

    Can you share the logs of backend? liming.ma@volosoft.com

  • User Avatar
    0
    hardip created

    hi

    I will confirm it.

    Can you share the logs of backend? liming.ma@volosoft.com

    Yes, sent mail(Subject - Confirm Email Link Error) with log file and details of the user id, time of the error.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please the code of TVD_Holdings_Ltd.AvalancheOCP.HttpApi.Host\Pages\Account\EmailConfirmation.cshtml.cs as well.

    Thanks.

       at Volo.Abp.Account.Public.Web.Pages.Account.AvalancheOCPEmailConfirmationModel.OnGetAsync() in D:\Source\AvalancheOCP\Dev\src\TVD_Holdings_Ltd.AvalancheOCP.HttpApi.Host\Pages\Account\EmailConfirmation.cshtml.cs:line 46
    
  • User Avatar
    0
    hardip created

    hi

    Please the code of TVD_Holdings_Ltd.AvalancheOCP.HttpApi.Host\Pages\Account\EmailConfirmation.cshtml.cs as well.

    Thanks.

       at Volo.Abp.Account.Public.Web.Pages.Account.AvalancheOCPEmailConfirmationModel.OnGetAsync() in D:\Source\AvalancheOCP\Dev\src\TVD_Holdings_Ltd.AvalancheOCP.HttpApi.Host\Pages\Account\EmailConfirmation.cshtml.cs:line 46 
    

    Sent in mail

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    public virtual async Task OnGetAsync()
    {
        //ReturnUrl = GetRedirectUrl(ReturnUrl, ReturnUrlHash);
        ReturnUrl = _configuration["App:BlazorUrl"];
    
        //TODO: It would be good to try to switch tenant if needed
        //CheckCurrentTenant(TenantId);
        using(CurrentTenant.Change(TenantId))
        {
            await _accountAppService.ConfirmEmailAsync(new ConfirmEmailInput {UserId = UserId, Token = ConfirmationToken});
        }
    }
    
  • User Avatar
    0
    hardip created

    hi

    public virtual async Task OnGetAsync() 
    { 
        //ReturnUrl = GetRedirectUrl(ReturnUrl, ReturnUrlHash); 
        ReturnUrl = _configuration["App:BlazorUrl"]; 
     
        //TODO: It would be good to try to switch tenant if needed 
        //CheckCurrentTenant(TenantId); 
        using(CurrentTenant.Change(TenantId)) 
        { 
            await _accountAppService.ConfirmEmailAsync(new ConfirmEmailInput {UserId = UserId, Token = ConfirmationToken}); 
        } 
    } 
    

    thank you, will test this.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    👍

  • User Avatar
    0
    hardip created

    Did not fix the issue

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is the TenantId have a value?

    Or specify the Nameof TenantId.

    [BindProperty(Name = "__tenant", SupportsGet = true)]
    public Guid? TenantId { get; set; }
    

    You can do not to switch the tenant, the middleware will automatically resolve and switch the tenant by default

  • User Avatar
    0
    hardip created

    hi

    Is the TenantId have a value?

    Or specify the Nameof TenantId.

    [BindProperty(Name = "__tenant", SupportsGet = true)] 
    public Guid? TenantId { get; set; } 
    

    You can do not to switch the tenant, the middleware will automatically resolve and switch the tenant by default

    Ok, specifying the name of the tenantId worked. Massive thank you.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09