Activities of "andmattia"

How can I inject Iconfiguration?

 public override async Task OnApplicationInitializationAsync(
        ApplicationInitializationContext context)
    {
        await context.AddBackgroundWorkerAsync<PollingWorker>();
    }

If I add an IServiceProvider I get this error

annot resolve parameter 'Microsoft.Extensions.DependencyInjection.IServiceCollection service' of constructor 'Void .ctor(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.
   at Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(ConstructorBinder[] availableConstructors, IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)

Hangfire

  • ABP Framework version: v5.3.1
  • UI type: Angular
  • DB provider: EF Core

HI how can I add a recurring job at run time? and how can I remove it?

so I try to add via startup but I try to read polling intervall via appsettings.json but I can't do it

 public PollingWorker()
    {
        //_options = ServiceProvider.GetService<IOptions<Dataptions>>().Value; --> Null exception
        RecurringJobId = nameof(PollingWorker);
        CronExpression = Cron.MinuteInterval(2);
    }

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

I try to login from winfrom using IIdentityModelAuthenticationService it works fine on host but how can I set the tenant? How can get tenat Id from name?

using (var cs = _provider.CreateScope())
                {
                    _tenant.Change(myTenantGuid, txtTenant.Text);


                    AsyncHelper.RunSync(() =>
                        _tokenManager.ObtainAccessToken(txtUser.Text, txtPassword.Text, txtUrl.Text));
                    var q = AsyncHelper.RunSync(() => _appService.GetAsync());
                   
                }

Hi

from my side it not works but I found this post and I remove

 responseType: 'code',

After that my login on angular side work I dont redirect me to IDS login page.

The issue still exists on API if I try to login from swagger the app redirect me to base auth and not to tenant auth

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

I've configure my app in multi tenant (with tenant resolver) and replace login component with local Angular UI the problem is that when I click login I'll be redirect to IDS (mvc page in place to my local Angular UI).

My App.Component.Ts is set to:

ngOnInit() {
    this.replaceableComponentsService.add({
      key: eAccountComponents.Login,
      component: LoginComponent,
    });
    this.replaceableComponentsService.add({
      key: eAccountComponents.Register,
      component: RegisterComponent,
    });
    this.replaceableComponentsService.add({
      key: eThemeLeptonComponents.AccountLayout,
      component: AccountLayoutComponent,
    });
  }

It works fine if I don't use tenantResolver but when I switch to tenant roselver (using {0} for placeholder) local login not work

Hi

I see the same and it works but redirect me to IDS page e not to my local login in angular why?

I re check all configuration on my module and work (partially on Angular).

I need to add to environment.ts

skipIssuerCheck: true

After Add this my app will be redirect to correct Auth Server (es Tenant 1 (t1) -> https://t1.auth.mydomain.com) but I use the custom login into angular with customize Login/register page

export class AppComponent {
  constructor(private replaceableComponentsService: ReplaceableComponentsService) {}

  ngOnInit() {
    this.replaceableComponentsService.add({
      key: eAccountComponents.Login,
      component: LoginComponent,
    });
    this.replaceableComponentsService.add({
      key: eAccountComponents.Register,
      component: RegisterComponent,
    });
    this.replaceableComponentsService.add({
      key: eThemeLeptonComponents.AccountLayout,
      component: AccountLayoutComponent,
    });
  }
}

This work fine if I don't use a normal tenant selector but in tenant rosolve by name when I click login I'll be redirect to Auth (Mvc page and not to angular route). I doesn't work on tenant/host side

I look into the call /.well-known/openid-configuration and I see that and i console I read an error that

main.fbfd4e772f61baa1.js:1 invalid issuer in discovery document expected: https://t1.mydomain.com current: https://auth.mydomain.com

"issuer": "https://auth.mydomain.com",
"jwks_uri": "https://t1.auth.mydomain.com/.well-known/openid-configuration/jwks",
"authorization_endpoint": "https://t1.auth.mydomain.com/connect/authorize",
"token_endpoint": "https://t1.auth.mydomain.com/connect/token",
"userinfo_endpoint": "https://t1.auth.mydomain.com/connect/userinfo",
"end_session_endpoint": "https://t1.auth.mydomain.com/connect/endsession",
"check_session_iframe": "https://t1.auth.mydomain.com/connect/checksession",
"revocation_endpoint": "https://t1.auth.mydomain.com/connect/revocation",
"introspection_endpoint": "https://t1.auth.mydomain.com/connect/introspect",
"device_authorization_endpoint": "https://t1.auth.mydomain.com/connect/deviceauthorization",
"frontchannel_logout_supported": true,
"frontchannel_logout_session_supported": true,
"backchannel_logout_supported": true,
"backchannel_logout_session_supported": true,

I think the problem is related to auth. This is the information the API try to use to authorize.

oauth2 (OAuth2, authorizationCode) Authorization URL: https://auth.mydomain.com/connect/authorize Token URL: https://auth.mydomain.com/connect/token Flow: authorizationCode

Is it correct?

About the git repo, your request is to clone the repo and reproduce the issue?

Hi

I can't because not existing this configuration.

The NG has identity server is not separated

Showing 131 to 140 of 188 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.1.0-preview. Updated on December 12, 2025, 10:36
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.