Activities of "bqabani"

Yes It was solved, Thank you

The solution was to create a reference for identity service module (not the administration service module)

using : https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication

The solution was to create a reference for identity service module (not the administration service module)

using : https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication

Thank you for your prompt answer!

Please provide me with more details, I cannot find IPermissionIntegrationService I searched for it all my solution, Not sure which dependency should I use,

And finally Plaese provide with a blog or documentation reference for that is possible

Thank you

  • ABP Framework version: v7.3.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes **Micro service **

I have a micro service (for example called Products Microservice) in that microservice I would like to check if a specific user has a permission, this user is not the current user, (I have his email only)

Kindly suggest all available solutions, the best solution that does not make me made connection to administration.

I think I need to use: var rs = await authorizationService.AuthorizeAsync(ClaimsPrincipal, requiredPolicy); but I do not have the (ClaimsPrincipal) and how can I get an instance of it related a specific user ? and is this good solution ?

Kindly advice

Thank you

  • ABP Framework version: v5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.
  • Steps to reproduce the issue:"

I have a customer scenario, so the application when it starts, it waiting for external event (using a third party), when the event is happend, But when the event is triggered, I should be able to use dependency injection, When I try to access the Service Provider, I get the error above, here is a code sample:

public override void OnApplicationInitialization(ApplicationInitializationContext context)
        {
            var configuration = context.GetConfiguration();  
            var SelfUrl = configuration["App:SelfUrl"];
            var app = context.GetApplicationBuilder();
            var env = context.GetEnvironment();
            var buses = context.ServiceProvider.GetServices<ServiceBusProcessor>();
            foreach (var processor1 in buses)
            {
                processor1.ProcessMessageAsync += (ProcessMessageEventArgs args) => ProcessMessageHandler(context, args);
                processor1.ProcessErrorAsync += ErrorHandler;
                processor1.StartProcessingAsync().GetAwaiter().GetResult();
            }
    }
    private async Task ProcessMessageHandler(ApplicationInitializationContext context, ProcessMessageEventArgs args) { 
       var serviceProvider = context.ServiceProvider ; 
       using (var scope = serviceProvider.CreateScope())
       {
           var handler = serviceProvider.GetService<TraineeProfileUpdateJobHandler>(); // this is throws an error
           var handler2 = scope.ServiceProvider.GetService<TraineeProfileUpdateJobHandler>(); // this is throws an error
            await handler.ExecuteAsync(parsed);
        }
    }
  • ABP Framework version: v5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:

2023-05-21 17:07:47.946 +03:00 [ERR] An exception was thrown while deserializing the token. Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {d8fbc7f5-259b-455a-b1f4-89121eb1d364} was not found in the key ring. For more information go to http://aka.ms/dataprotectionwarning at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)

Hi,

Did not work, Please note that:

  • Version is 5.0.0
  • identity is seperated
  • Account module source code is added to project
  • Lepton Theme module source code is added to project

And I tried to create a new project with the same setup I got the same error

  • ABP Framework version: v5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Lepton theme projects and volo account projects source modules are added to the solution
  • This issue appeared when we migrated from abp 4.2.1 to 5.0.0

An unhandled exception occurred while processing the request. AbpException: Could not find the bundle file '/libs/bootstrap/css/bootstrap.rtl.css' for the bundle 'Lepton.Global'! Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperResourceService.ProcessAsync(ViewContext viewContext, TagHelper tagHelper, TagHelperContext context, TagHelperOutput output, List<BundleTagHelperItem> bundleItems, string bundleName)

Stack Query Cookies Headers Routing AbpException: Could not find the bundle file '/libs/bootstrap/css/bootstrap.rtl.css' for the bundle 'Lepton.Global'! Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperResourceService.ProcessAsync(ViewContext viewContext, TagHelper tagHelper, TagHelperContext context, TagHelperOutput output, List<BundleTagHelperItem> bundleItems, string bundleName) Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpBundleTagHelperService<TTagHelper, TService>.ProcessAsync(TagHelperContext context, TagHelperOutput output) Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count) AspNetCore._Themes_Lepton_Layouts_Account_Default+<>c__DisplayClass32_0+<<ExecuteAsync>b__0>d.MoveNext() in Default.cshtml + <abp-style-bundle name="@LeptonThemeBundles.Styles.Global" /> Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync() AspNetCore._Themes_Lepton_Layouts_Account_Default.ExecuteAsync() in Default.cshtml + <html lang="@CultureInfo.CurrentCulture.Name" dir="@langDir"> Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)

I could make this work by using the following code:

public override void PostConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); var serverName = configuration.GetValue<string>("Schedule:ServerName"); var workerCount = configuration.GetValue<int>("Schedule:WorkerCount"); if (!string.IsNullOrEmpty(serverName) && workerCount > 0) { Configure<AbpHangfireOptions>(options => { options.ServerOptions = new BackgroundJobServerOptions { WorkerCount = workerCount, ServerName = serverName, Queues = new string[] { "default" , "logs"}, }; }); } base.PostConfigureServices(context); }

Still cannot limit the execution time for job instance, so any job does not work more than 5 minutes for example

Showing 1 to 10 of 43 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09