Base solution for your next web application

Activities of "hra"

I am doing a review of nuget packages introduced by my own code changes to ANZ. During this review, I have encountered at least one deprecated 3rd party dependency in the base ANZ/ABP.

Example: Microsoft.Extensions.Configuration.AzureKeyVault

Is Volosoft aware of this deprecated package (and any others), and what is the upgrade roadmap?

While (in this case) Microsoft has commented this particular dependency is still supported for the time being - it's deprecation was announced over a year ago, I just wish to know what the Volosofts timelines are, so I can time my own upgrade of the ANZ template to be after this happens.

Thank you

Hi @sedulen,

I had similar issues suppressing this logging. Finally I found configuring it in code during creation of the WebHost worked (in my Web.Host project)

Here's mine...

public static IWebHostBuilder CreateWebHostBuilder(string[] args)
{
    return new WebHostBuilder()
        .UseKestrel(opt =>
        {
            opt.AddServerHeader = false;
            opt.Limits.MaxRequestLineSize = 16 * 1024;
        })
        .UseContentRoot(Directory.GetCurrentDirectory())
        .UseIIS()
        .UseIISIntegration()
        .ConfigureLogging(logging =>
        {
            logging.AddFilter("Microsoft.AspNetCore.SignalR", LogLevel.Warning);
            logging.AddFilter("Microsoft.AspNetCore.Http.Connections", LogLevel.Warning);
            logging.AddFilter("Microsoft.AspNetCore.Hosting.Diagnostics", LogLevel.Warning);
            logging.AddFilter("Microsoft.AspNetCore.Routing.EndpointMiddleware", LogLevel.Warning);
            logging.AddFilter("Abp.AspNetCore.SignalR.Hubs.AbpCommonHub", LogLevel.Warning);
            logging.AddFilter("Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor", LogLevel.Warning);
            logging.AddFilter("Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler", LogLevel.Warning);
            logging.AddFilter("Microsoft.AspNetCore.Cors.Infrastructure.CorsService", LogLevel.Warning);
        })
        .UseStartup<Startup>();
}

I've had this same issue, with a console app that is loading the Abp modules then accessing tenant settings. I noticed that the truncation occurs every single time, only for encrypted values.

HTH

I have a service which is consumed by both my web request logic, and my background job - yes it maintains some state during the operation.

I was using "IPerWebRequestDependency" scope - which is fine for the web request - but in my background worker, every dependent of this service gets its own (transient) instance.

How do I register this service to behave the same for both?

Thanks,

Hi @ismcagdas,

Thanks for responding. I kept digging and I actually figured it out. It was my fault.

I had adapted the Abp dbcontext conventions such that all changes within a UOW that are saved at the same time, will share the same timestamp. That's been working great for us, up until now, when I've started using the BackgroundJob infrastructure.

It appears to have effectively set the "CreationDate" and "TimeOfNextExecution" (I think thats the field name) to the exact same value. For some reason this makes the background worker process chase a date/time that never arrives (well, almost never - very unreliable). I have altered my UOW modification such that I only turn it on for UOW scopes that I need it, rather than across the board.

Thanks please consider closed.

AspNetZero 10.0.0

I have paired down my backgroundjob to something very, very simple - but most of the time, it goes straight to "Abandoned" and never executes.

I have found the only way I can get one to execute is to:

  1. delete all abandoned background jobs
  2. refresh my browser which is calling the Application Service to enqueue the job
  3. then call the application service to enqueue the job

Then what happens is, it will queue a single job - but if I click the button to queue a second one, it goes into abandoned. Why is this? Why is there no logging when it chooses to abandon a job? I have also registered on the bus for error callbacks - and none come through.

Thanks,

Hi musa - it wasn't my code, but the admin portal. You are correct, it changed the DisplayName, not the Name.

Thanks

AspNetZero 10.0.0

The XmlDoc for UserManager.CreateAsync states:

    //     Is this a static role? Static roles can not be deleted, can not change their
    //     name. They can be used programmatically.
    public virtual bool IsStatic { get; set; }

However, the user interface does not prevent the editing of the name

Note: I was able to save these changes

I cannot find any documentation detailing "User Account Lockout".

On the User creation page, there is a tickbox called "Lockout Enabled" - what does this do?

I have had user accounts get locked out. Where do I see in the interface whether a user account is locked out or not?

For the accounts that had become "locked out", I went to the users list, clicked "Actions" and chose "Unlock" - is that what is supposed to be done? How do we know that the unlock worked (other than asking the user if they were able to log in...)

My Assumptions:

The "Lockout enabled" checkbox does not mean the user account is locked out, it means it CAN be locked out if they violate login policies (failed attempts). If this is not ticked, they can fail login as many times as they like, they will not be locked out. There is NO UI for seeing if a user account is currently locked out or not.

Prerequisites

AspNetZero 10

We are using Microsoft Authentication, and have noticed that after a user has provisioned their account using "Sign in with Microsoft", their name appears as: "John Smith Smith" - because their first and last names are squeezed into the AbpUser.FirstName in addition to their last name being placed in Abpuser.Surname.

After recently being given a code sample, we can now see why: in MicrosoftAuthProviderApi is the following code:

            var result = new ExternalAuthUserInfo
            {
                Name = MicrosoftAccountHelper.GetDisplayName(payload),
                EmailAddress = MicrosoftAccountHelper.GetEmail(payload),
                Surname = MicrosoftAccountHelper.GetSurname(payload),
                Provider = Name,
                ProviderKey = MicrosoftAccountHelper.GetId(payload)
            };

I believe It should be

            var result = new ExternalAuthUserInfo
            {
                Name = MicrosoftAccountHelper.GetGivenName(payload),
                EmailAddress = MicrosoftAccountHelper.GetEmail(payload),
                Surname = MicrosoftAccountHelper.GetSurname(payload),
                Provider = Name,
                ProviderKey = MicrosoftAccountHelper.GetId(payload)
            };
Showing 31 to 40 of 59 entries