Starts in:
1 DAY
9 HRS
36 MIN
23 SEC
Starts in:
1 D
9 H
36 M
23 S

Activities of "learnabp"

can you please let me know how i can do this ??

In our use case the users are not allowed to change their username so i have override the UpdatAsync to be as follows

(await UserManager.SetUserNameAsync(user, input.UserName)).CheckErrors();

The above line is what changes the SecurityStamp which forces the user out because we are using AbpSecurityStampValidator to ensure that the same user cant be signed in concurrently using the same username.

    public override async Task<IdentityUserDto> UpdateAsync(Guid id, IdentityUserUpdateDto input)
    {

        //ADDED BY VB: To check if all Roles avalible as per license have been consumed.
        if (CurrentUser.UserName != "dfo.admin")
        {
            await CheckCurrentTenantsLicenseConsumed(id, input);
        }

        await IdentityOptions.SetAsync();

        var user = await UserManager.GetByIdAsync(id);
        user.ConcurrencyStamp = input.ConcurrencyStamp;

        if (!string.Equals(user.UserName, input.UserName, StringComparison.InvariantCultureIgnoreCase))
        {
            if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled))
            {
                (await UserManager.SetUserNameAsync(user, input.UserName)).CheckErrors();

            }
        }

        await UpdateUserByInput(user, input);
        input.MapExtraPropertiesTo(user);
        (await UserManager.UpdateAsync(user)).CheckErrors();
        await CurrentUnitOfWork.SaveChangesAsync();

        var userDto = ObjectMapper.Map<Volo.Abp.Identity.IdentityUser, IdentityUserDto>(user);

        //ADDED BY VB: To send an email to the user notifying their prifile has changed 
        var ppmUser = await GetUserByEmail(input.Email);
        await _subscriptionEmailer.SendPpmUserUpdatedEmailAsync(ppmUser, "MVC");

        return userDto;
    }

Thanks for you help @liangshiwei

We want to embed a link in a userfriendlymessage message which is thrown in a AppService

how can we achive this?

I have discoverd a side effect when implementing this in our application to deal with concurrent user.

It seems when we updated the user via his profile or in the users table under Identity the security stamp is updated and the user is logged out.

can you please suggest how we can over come this, if the user is updating his profile or via the user table the user shouldn't update its seucirty stamp.

Question
  • ABP Framework version: v4.4.0 RC2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
  1. Run abp suite
  2. Click Create new Solutions button
  3. Fill in the form with the following
    1. UI Framework: MVC
    2. Mobile React mobile
    3. Database Provider: EntityFramework
    4. Database Mnagaement Server: SQLServer
    5. Tick Public Site
    6. Tick Preview Version

Issues found

  1. Open the solutions and you will find that the ABP License is missing in appsettings.jason and when you run the DB Migrator project you getting a License missing error.
  2. When i run the public site i get the following error

Have a lok at the below screen shoot when at the login screen and not logged in when i supply the __tenantId as a QueryStringParamater it doesn't populate the Tenant-Switch-Box automatically

i have tried that it does wirk unless the user is authenticated

When the user is not logged in I would like to user the __teantid= parament to set the teannt but it doesn't seem to be working.

can you please help

We would like to automatically login in the user when they Confirm their Phone Number or Reset their Password using the forgot password feature, having the user redirected to the login screen or a confirmation screen adds confusion.

In the below code there is a task //TODO: Try to automatically login! can we please have the solution so we can use it in our SaaS product for DesertFire?

public virtual async Task<IActionResult> OnPostAsync()
{

   try
   {
       ValidateModel();
       SetNormalizeReturnUrl();

       await AccountAppService.ResetPasswordAsync(
           new ResetPasswordDto
           {
               UserId = UserId,
               ResetToken = ResetToken,
               Password = Password
           }
       );
   }
   catch (Exception e)
   {
       if (e is AbpIdentityResultException && !string.IsNullOrWhiteSpace(e.Message))
       {
           Alerts.Warning(GetLocalizeExceptionMessage(e));
           return Page();
       }

       if (e is AbpValidationException)
       {
           return Page();
       }

       throw;
   }

   //TODO: Try to automatically login!
   return RedirectToPage("./ResetPasswordConfirmation", new
   {
       returnUrl = NormalizeReturnUrl
   });
}

I have deployed our app to Azure WebApp and are using DevOps pipelines to deploy using packaged deploy method using zp file

Seems when we do this ABP is unable to write the log to "Logs/logs.txt" becuase the wwwroot dir is set to read only by design

            Log.Logger = new LoggerConfiguration()
#if DEBUG
                .MinimumLevel.Debug()
#else
                .MinimumLevel.Information()
#endif
                .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
                .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                .Enrich.FromLogContext()
                .WriteTo.Async(c => c.File("Logs/logs.txt"))
#if DEBUG
                .WriteTo.Async(c => c.Console())
#endif
                .CreateLogger();

what is the best way to write logs on azure?

Showing 61 to 70 of 136 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06