Activities of "JanneHarju"

When tenant has only one third party auth provider set to use and local login is not in use user is forwarded to thrid party login page automatically as you know. If that user click logout, user is redirected to logged-out page in our application after user is logged out. In that page I added button which user can click and return to application. What if user wants to change Tenant to other. Like our user suppport. They use impersonator so they can go any tenant. Now if they go to any tenant which have local login disabled and azure login is used for example they cannot change tenant anymore in login page because auth server is remembering tenant and redirecting to microsoft login page before user can change tenant.

In local environment with ng serve both applications are in same domain, localhost. In that scenario it was enough to clear __tenant cookie from cookie. But now it is not working in our Azure environemnt where application is in application-test.ab.app and auth server is auth.application-test.ab.app. When I'm in application I see this cookie.

Currently I am trying this to forget tenant when user is logging out:

cookieService.delete('__tenant', '/');
sessionStateService.setTenant(undefined);

I use ngx-cookie-service to delete cookie. I also tried to set tenant to undefined.

I know that I cannot delete cookie from another domain. So do you have any solution to forget selected tenant. I only need to do this for tenants which are not using local login.

If user select his own tenant but not have yet registered into it. After user has logged in for example in microsoft login page user is returned to register page. In register page user can change his username and email but also can change tenant. If user knows any other tenant which have self registration in use user can change to that tenant and then click register button. This way it is possible to go into wrong tenant. User can for example go to host tenant by clearing tenant in dialog.

Is this real problem and can you reproduce it?

Auth server is separated.

Angular version is 18.2.13 as suggested in 8.3 upgrade guide. I got error in browser console but everything seems to be working. Original error:

Cannot find the fi-FI locale file. You can check how can add new culture at https://abp.io/docs/latest/framework/ui/angular/localization#adding-a-new-culture

original related code:

import { registerLocaleData } from '@angular/common';
import { registerLocale } from '@volo/abp.ng.language-management/locale';
registerLocaleData(localeFi);
provideAbpCore(
  withOptions({
    environment,
    registerLocaleFn: registerLocale(),
  }),
)

After I read this guide https://abp.io/docs/latest/framework/ui/angular/localization#adding-a-new-culture I added this code.

import { differentLocales } from '@abp/ng.core';
export function registerLocale(locale: string) {
  return import(
    /* webpackChunkName: "_locale-[request]"*/
    /* webpackInclude: /[/\\](/docs/latest/framework/ui/angular/en%7Cfi).js/ */
    /* webpackExclude: /[/\\]global|extra/ */
    `@angular/common/locales/${differentLocales[locale] || locale}.js`
  );
}

and I also tried to add localization through angular.json polyfills array like this.

"polyfills": [
  "src/polyfills.ts",
  "@angular/localize/init",
  "@angular/common/locales/fi"
],

Exception what I get in browser console is this:

TypeError: Failed to resolve module specifier '@angular/common/locales/fi.js'
    at registerLocale (app.module.ts:74:60)

74 line is @angular/common/locales/${differentLocales[locale] || locale}.js

I also tried this compination.

import { registerLocale } from '@abp/ng.core/locale';
provideAbpCore(
  withOptions({
    environment,
    registerLocaleFn: registerLocale({
      cultureNameLocaleFileMap: {
        'fi-FI': 'fi',
      },
      errorHandlerFn: error => {
        console.error('Error registering locale:', error);
      },
    }),
  }),
),

but no luck.

So how those localizations should be loaded?

ps. this makes no sence in abp support form. Which one is yes, MVC or Angular?

  • ABP Framework version: v8.2.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): separate
  • Exception message and full stack trace: The entity type 'ExtraPropertyDictionary' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943. System.InvalidOperationException: The entity type 'ExtraPropertyDictionary' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943. at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.ValidateNonNullPrimaryKeys(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.Infrastructure.ModelRuntimeInitializer.Initialize(IModel model, Boolean designTime, IDiagnosticsLogger1 validationLogger) at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, ModelCreationDependencies modelCreationDependencies, Boolean designTime) at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel(Boolean designTime) at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model() at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.<TryAddCoreServices>b__8_4(IServiceProvider p) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.EntityFrameworkCore.DbContext.get_ChangeTracker() at Volo.Abp.EntityFrameworkCore.AbpDbContext1.Initialize(AbpEfCoreDbContextInitializationContext initializationContext) at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString) at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.GetDbContextAsync() at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository2.GetDbSetAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.Dyn2025-01-16 13:12:43.260 +02:00 [INF] Loaded ABP modules:
  • Steps to reproduce the issue: I managed to find that this exception is thrown from these lines at our background process manager:
_mLOutputStorageService.ConnectToOutputStorage();
string currentTenantName = _currentTenant.Name!;
IList<BaselineDemandForecast> baselineDemandForecasts = await _mLOutputStorageService.DownloadForecastDataAsync(currentTenantName);
//remove all old forecasts from same run and insert new ones
var newRunIdFromDownloadedData = baselineDemandForecasts[0]?.RunId;
var query = await _baselineDemandForecastRepository.GetQueryableAsync();
var oldForecasts = query.Where(x => x.RunId == newRunIdFromDownloadedData);
await _baselineDemandForecastRepository.DeleteFromQueryAsync(oldForecasts);
foreach (var item in baselineDemandForecasts)
{
item.TenantId = _currentTenant.Id;
}
await _sqlBulkOperationsBaselineDemandForecastRepository.BulkInsert(baselineDemandForecasts);

and spesific line is: var query = await _baselineDemandForecastRepository.GetQueryableAsync();

Weird thing is that I haven't touched this part of code. I have some changes is in some Repositories. Here is original code from there. public EfCoreCalculatedSeasonalityProfileRepository(IDbContextProvider<ForecastingDbContext> dbContextProvider) and we changed to use interface like this: public EfCoreCalculatedSeasonalityProfileRepository(IDbContextProvider<IForecastingDbContext> dbContextProvider) but changes were into different repositories than what I'm using where probelm seems to be.

I found that in some other your customers have same kind of issues that they were missing module dependeces but I didn't found samekind of deficiencies in our code.

Here is definiton of that entity: public class BaselineDemandForecast : Entity<Guid>, IMultiTenant And here is builder configuration:

public class BaselineDemandForecastModelCreatingExtensions : IModuleEntityTypeConfiguration<BaselineDemandForecast>
{
    public bool IsApplicationDbContext { get; set; }
    public bool IsSqlite { get; set; }
    
    public void Configure(EntityTypeBuilder<BaselineDemandForecast> builder)
    {
        builder.ToTable(ForecastingDbProperties.DbTablePrefix + "BaselineDemandForecasts", ForecastingDbProperties.DbSchema);
        builder.ConfigureByConvention();
        builder.ConfigureByConventionSCM(IsSqlite);
        //here is ton of field definitions.
    }
}

Now I made test what is running this part of code. I only mock MLOutputStorageService to give me spesific list of items. And no exception.

Any idea what could be creating this issue?

  • ABP Framework version: v8.2.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): separeted
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I logged in into tenant with user. Navigated to Account/manage and there I go to Personal information. There I click confirm button next to email field. I receive email. Confirmation link contains only account/EmailConfirmation?userId=1111111-7777-1111-6666-77777777&__tenant=666666-4444-7777-ec6a-99999999&confirmationToken=SOME_TOKEN&returnUrl=https://our.url//account/login So it is missing domain part. Reseting password is working as it should and link is complete and working. I checked text template and they are similar between password reset and email confirmation.

div>
    a> href="{{model.link}}">{{L "ConfirmMyEmail"}} a>
div>

We have these in configuration:

Configure<AppUrlOptions>(options =>
{
    options.Applications["Angular"].RootUrl = configuration["App:AngularUrl"];
    options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
    options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "account/email-confirmation";
});
Question
  • ABP Framework version: v8.2.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): separeted
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Few days ago I found migration guide to 8.2 but yesterday and today links are not working anymore. Here are two links https://abp.io/blog/announcing-abp-8-2-release-candidate Which are going to https://docs.abp.io/en/abp/8.2/Migration-Guides/Abp-8_2 and https://docs.abp.io/en/commercial/8.2/migration-guides/v8_2 and they are nto working anymore. Also migration guide for 8.2 is missing from here too https://abp.io/docs/latest/release-info/migration-guides

I assume that FlagIcon needs to be removed from several places, IdentitySession needs to be added to DbContext and then berhaps we need to add these packages to HttpApi.Host project (I found some problem for others if they are not added) <PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.5.1" /> <PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.5.1" /> <PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.5.1" />

  • ABP Framework version: v8.2.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): separeted
  • Exception message and full stack trace: -
  • Steps to reproduce the issue:

When I generate proxies for my angular application files are broken because of broken imports. I have noticed that it might be related to PagedResultDto<T> So make endpoint which returns object which extends PagedResultDto<MyObject> then generate proxies like this: abp generate-proxy -t ng -m app --target MyProject -a default Then you noticed that in model file there is extra import for MyObject even when MyObject is declared in same file. Here is one example of our proxy model:

import type { VendorDto } from '../scm/master-data-management/vendors/models';
import type { PagedResultDto } from '@abp/ng.core';
import type { CalculatedOrderProposalSummaryItemDto } from './models';
import type { OrderProposalFocusBarValuesDto } from '../order-proposal-focus-bar-values/models';

export interface CalculatedOrderProposalSummaryItemDto {
  vendor: VendorDto;
  vendorGroupName?: string;
}

export interface PagedOrderProposalSummaryItemResultDto extends PagedResultDto<CalculatedOrderProposalSummaryItemDto> {
  focusBarValues: OrderProposalFocusBarValuesDto;
  calculationDate?: string;
}

So here CalculatedOrderProposalSummaryItemDto is imported even that it is declared in same file. So fix would be don't import interface when it is declared in same file.

This started to happend after we upgraded from abp 7 to abp 8.

  • ABP Framework version: v8.0.5
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Separated
  • Exception message and full stack trace:
DependencyResolutionException: None of the constructors found on type 'Volo.Abp.Account.Public.Web.ExternalProviders.AccountExternalProviderOptionsManager`1[Microsoft.AspNetCore.Authentication.Google.GoogleOptions]' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.Account.ExternalProviders.IAccountExternalProviderAppService accountExternalProviderAppService' of constructor 'Void .ctor(Microsoft.Extensions.Options.IOptionsFactory`1[Microsoft.AspNetCore.Authentication.Google.GoogleOptions], Volo.Abp.Account.ExternalProviders.IAccountExternalProviderAppService, Volo.Abp.Security.Encryption.IStringEncryptionService, Volo.Abp.MultiTenancy.ITenantConfigurationProvider, System.Collections.Generic.IEnumerable`1[Volo.Abp.Account.Public.Web.ExternalProviders.IPostConfigureAccountExternalProviderOptions`1[Microsoft.AspNetCore.Authentication.Google.GoogleOptions]])'.

Stack trace:

See https://autofac.rtfd.io/help/no-constructors-bindable for more info.
   at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext context)
   at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
   at Autofac.Builder.RegistrationBuilder`3.&lt;&gt;c__DisplayClass39_0.&lt;OnActivated&gt;b__0(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.CoreEventMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext context)
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
  • Steps to reproduce the issue: Update project to 8.1.1 and then downgrade to 8.0.5. After that start project and navigate to AuthServer login page. You get given error message.

I was upgrading our project from 7.4 to 8.1.0 but after we notice that there were severe EF performance problem I tried to update to 8.1.1 but still performance problem. After that I tried to downgrade to 8.0.5 but then I got this error message. 8.0.5 downgrade fixed our performance problem but login page is not working. If you don't have any problem with 8.0.5 then is there any other options than to start update process all over again from 7.4 to 8.0 or wait until 8.1.2 is published and hopefully performance problem is gone. I was thinking is there some changes in 8.1 AuthServer version which might not work with 8.0 version. I think abp update command change AuthServer code when I updated to 8.1 version.

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separated
  • Exception message and full stack trace:

I'm migrating our application from IdentityServer to OpenIddict. Our application is running at Azure. When running locally all is working as it should. When running in Azure, login can be done succesfully and in browser's network tab I can see that all tokens are got succesfully. After authserver token call there is /api/abp/application-configuration?includeLocalizationResources=false call which returns status code 200 but currenUser and auth.grantedPolicies are empty. When checking logs there is line saying that ProcessAuthenticationContext was marked as rejected by OpenIddict.Validation.OpenIddict. I have done these migration guides: https://docs.abp.io/en/abp/latest/Migration-Guides/OpenIddict-Step-by-Step and https://docs.abp.io/en/abp/latest/Migration-Guides/OpenIddict-Angular I added that app.UseAbpOpenIddictValidation(); to our AuthServer. And now I notice that it was not needed, only if authserver is part of host, but our AuthServer is separeted. So now I removed it from AuthServer even though in example project what I generated there is UseAbpOpenIddictValidation added. After I removed I don't get anymore that rejection log line but it still doesn't work. When I did migration I left IdentityServer tables in database if I need to check some configurations or if I need backup plan. Eventhough there were not anything about scope update I changed role to roles in fronend configuration because in OpenIddictDataSeedContributor I notice that role was changed from role to roles.

Do I need to add some configuration or code to backend to get it work?

Showing 1 to 9 of 9 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
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 01, 2025, 08:37