Activities of "MichelZ"

  • ABP Framework version: v6.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

We are using ICancellationTokenProvider for our repositories with the GetCancellationToken() method, so we don't have to sprinkle the CancellationTokens into every method. This works well with the HttpContext Token Provider.

We would like to do the same thing with Background Workers (we are using HangfireBackgroundWorkerBase) - but we are not sure how to... any pointers? Or do we need to convert our Repositories to take CancellationTokens as parameters for this to work properly?

Thanks

  • ABP Framework version: v6.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

I haven't found the answer to this... with Identity Server it was possible to use Azure AD to log into ABP. Is this still possible while using OpenIDDict?

We are in the process of migrating from IDS to OpenIDDict, but we haven't found a documented answer for this yet...

Thanks

  • ABP Framework version: v5.1.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We have upgraded to 5.1.1 and one of the features we're interested in is Impersonation. This worked well in aspnetzero for us. We have added the "Impersonation" Claim Type to the _App application.

However, we can't see any sign of Impersonation in the Angular UI. There are no permissions to set, there are no impersonation options.

We have looked at the documentation here: https://docs.abp.io/en/commercial/latest/modules/account/impersonation#angular

The documentation is fairly thin, some more description on HOW to impersonate users would also be great.

Question

Hi

Using abp 4.4 with EF/SQL Server.

We don't like using "Id" as the column name for our entities, so we are using this workaround: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/586#issuecomment-135599562

It does work fine for entities that don't have a Guid Key. Once the Key is Guid, things start to break down. EF throws errors that the "Id column was not found".

We have found the cause of it, it's AbpDbContext.TrySetGuidId and AbpDbContext.ConfigureValueGenerated

We have also found a suitable workaround by overriding these functions like this:

protected override void TrySetGuidId(EntityEntry entry, IEntity<Guid> entity)
        {
            if (entry.Metadata.FindProperty("Id") == null)
            {
                // Ignore this, it's because we have removed the Id property.
                return;
            }

            base.TrySetGuidId(entry, entity);
        }

        protected override void ConfigureValueGenerated<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
            where TEntity : class
        {
            if (!typeof(IEntity<Guid>).IsAssignableFrom(typeof(TEntity)))
            {
                return;
            }

            // Ignore if Id has NotMapped attribute
            var type = mutableEntityType.ClrType;
            var propertyInfo = type.GetProperty("Id", BindingFlags.DeclaredOnly |
                                                      BindingFlags.Public |
                                                      BindingFlags.Instance);

            if (propertyInfo != null)
            {
                var attribute = propertyInfo.GetCustomAttribute(typeof(NotMappedAttribute));
                if (attribute != null)
                {
                    return;
                }
            }

            base.ConfigureValueGenerated<TEntity>(modelBuilder, mutableEntityType);
        }

The configureValueGenerated function does create the property when it does not exist. So even when it was excluded with [NotMapped], this line from AbpDbContext adds it: var idPropertyBuilder = modelBuilder.Entity().Property(x => ((IEntity)x).Id);

(Note the documentation saying that "Returns an object that ban be used to configure a property of the entity type. If the specified property is not already part of the model, it will be added.")

So the Id property is added to the model if the type is Guid.

Then the TrySetGuidId also expects the Id property to be there: var idProperty = entry.Property("Id").Metadata.PropertyInfo;

Which of course fails, too.

Now to the question:

  • Is this the right way to handle this situation, or do you see a better way?
  • Are there some improvements for ABP that you can do to better support this scenario?

Thanks Michel

  • ABP Framework version: v4.4.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

We are using docker to develop a solution using abp. This means docker will often need to download ABP packages. We often get the following error with multiple packages, sometimes for hours, and then the error suddenly disappears. We don't know what to do currently and would like to ask for help.

#132 43.50 /usr/share/dotnet/sdk/5.0.400/NuGet.targets(131,5): error : Failed to download package 'Volo.Abp.Account.Pro.Shared.Application.4.4.2' from 'https://nuget.abp.io/redacted/v3/package/volo.abp.account.pro.shared.application/4.4.2/volo.abp.account.pro.shared.application.4.4.2.nupkg'. [/src/src/company.product.AgentHttpApi.Host/company.product.AgentHttpApi.Host.csproj] #132 43.50 /usr/share/dotnet/sdk/5.0.400/NuGet.targets(131,5): error : Response status code does not indicate success: 409 (Conflict). [/src/src/company.product.AgentHttpApi.Host/company.product.AgentHttpApi.Host.csproj]

The step that provokes this is: RUN dotnet restore "src/company.product.AgentHttpApi.Host/company.product.AgentHttpApi.Host.csproj" --configfile "nuget.config"

Any idea what could cause this?

Thanks Michel

  • ABP Framework version: v4.4.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: None
  • Steps to reproduce the issue:" Create an appsettings.Development.json, override connection string "Default" in it, set Environment variable DOTNET_ENVIRONMENT to Development

Hi

We are trying to make the DbMigrator project aware of different environments by using an appsettings.json per environment. This is usually straight forward by just creating appsettings.<Environment>.json file.

Unfortunately in the DbMigrator project this does not seem to work. While troubleshooting I have injected IConfiguration into the DbMigratorHostedService, and I did a Console.WriteLIne(_configuration.GetConnectionString("Default")); in the StartAsync method. Surprisingly, THIS WORKS and it gives the correct connection string! However, strangely it executes the DbMigration on the connection string from the original appsettings.json, instead of the one from IConfiguration..... I can't explain why. I can change the appsettings.json, and it connects to a different database, so it's definitely using that one.

Any ideas?

Thanks Michel

Using Angular with separate IdentityServer. Tenants resolve using subdomain tenant resolver.

I keep running into issues. Current issue: Got subdomain identity server, {0}.identity.domain.com The Http Api however has "identity.domain.com" as Authority, which obviously doesn't work.

I found this that talks about a Wildcard Issuer Validator: https://github.com/abpframework/abp/pull/8884 However the code is not available anymore on Github, only a nuget package (that's not cutting it for me...)

Is there any official guideance on this? Maybe just somehow who creates a new project and configures it that it works with subdomains, angular and separate identity server and documents all the relevant settings in a blog post or so? :) This can't be such an unusual scenario, but I'm really struggling.

  • ABP Framework version: v4.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace: N/A
  • Steps to reproduce the issue: N/A

Hello

We are looking into using ABP.IO for our own platform. We would have multiple "products" (applications) which are each multi-tenant, and we are looking into providing a shared identity for them, so we/customers can use a single login (SSO) with all applications.

Is this something that ABP (Commercial) can do? Can you use a single identity server with multiple (ABP) applications?

Thanks MIchel

  • ABP Framework version: v4.1-rc2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace: N/A
  • Steps to reproduce the issue: N/A

Hi

We are trying to deploy a multi-tenant angular application with a separate identity server component. It seems like we're not able to get the angular application to use the tenant hostname in the redirectUri parameter.

According to this: https://docs.abp.io/en/abp/latest/UI/Angular/Multi-Tenancy#domain-tenant-resolver we have set the environment config like this:

`
export const environment = {
  production: true,
  application: {
    baseUrl: "https://{0}.app.staging.us.domain.cloud",
    name: 'My',
  },
  oAuthConfig: {
    issuer: 'https://identity.staging.us.domain.cloud',
    redirectUri: "https://{0}.app.staging.us.domain.cloud",
    clientId: 'My_App',
    responseType: 'code',
    scope: 'offline_access My',
  },
  apis: {
    default: {
      url: 'https://ep.staging.us.domain.cloud',
      rootNamespace: 'DO.My',
    },
  },
} as Environment;`

it does seem to resolve the tenant with: https://ep.staging.us.domain.cloud/api/abp/multi-tenancy/tenants/by-name/test

and we get a response: {"success":true,"tenantId":"4035a222-3aaf-d3ec-9ba7-39f9d56a9864","name":"test"}

but the redirect to the identity component is: https://identity.staging.us.domain.cloud/connect/authorize?response_type=code&client_id=My_App&state=randomblah&redirect_uri=https://{0}.app.staging.us.domain.cloud&scope=openid offline_access My&code_challenge=randomblah&code_challenge_method=S256&nonce=randomblah

note that {0} did not get replaced with the tenant name. The URL we're using in the browser is: https://test.app.staging.us.domain.cloud

Any ideas what we're doing wrong?

Thanks & Regards Michel

Showing 1 to 9 of 9 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 14, 2025, 14:54