Activities of "sinancondo"

So FE can send telemetries to Azure AppInsights

When we add or remove role from user , the roles changes are not immediately reflected to the user , and this cause user to get 403 error when using authorization attribute with claim or even when manually check permission using permissionChecker.IsGrantedAsync , unless the user log out and login. How can we make the change in roles get reflected immediately to the user access when they get changes without need user to log out and login again .

I want to override some defaults and make all Business Exceptions return as 422 , how can I do that ? I see there is map option but that for a single error code, what I want is by type of exception. thanks

We have around 190 permission in the [dbo].[AbpPermissions] table with 5 roles, we dont use explicitly claims , it is more users/roles/permissions structure .

In reference to this thread : https://abp.io/support/questions/9088/API-become-slow-after-enabling-Redis-server

I have overridden the AbpApplicationConfigurationAppService and find the worst offender is : await GetAuthConfigAsync(); As it takes sometimes on intial call 8 seconds, on subsequent calls it get down to around 3 second, which is still have. So in total GetAsync call takes, I am using local docker Redis and the CPU and others are all look very good, no pressure on the server and no physical network, can you please advise ?

I am trying to authenticate from serviceA to serviceB using same JWT token that user used to connect to service A , but so far I dont see example of how to do that, most examples assume credentials are fixed, but for me the user is different and I have to forward the token . Can you please advise ?

The dynamic proxy interface cannot be resolved I have sent you the project by email , please let me know if you need anything else

`fail: Volo.Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter[0] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": null, "validationErrors": null }

fail: Volo.Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter[0] An exception was thrown while activating Cao.CatOs.TestHarness.Api.Host.Features.CatFile.CatFileSummaryTestService. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Cao.CatOs.TestHarness.Api.Host.Features.CatFile.CatFileSummaryTestService. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Cao.CatOs.TestHarness.Api.Host.Features.CatFile.CatFileSummaryTestService' can be invoked with the available services and parameters: Cannot resolve parameter 'Cao.CatOs.CatFiles.ICatFileSummaryAppService catFileAppService' of constructor 'Void .ctor(Cao.CatOs.CatFiles.ICatFileSummaryAppService)'.

See https://autofac.rtfd.io/help/no-constructors-bindable for more info. at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.

trce: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[53] Exception Filter: After executing OnExceptionAsync on filter Volo.Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter. `

I fixed that issue , but still failing to run the application, now getting this one :

Full class , and I am already depending on the mentioned module :

[DependsOn(
    typeof(AbpAutofacModule),
    typeof(AbpHttpClientModule), //used to create client proxies
    typeof(CatOsApplicationContractsModule), //used to create client proxies,
    typeof(AbpAspNetCoreModule),
    typeof(CatOsHttpApiClientModule)
)]
public class CatOsHttpApiClientTestModule : AbpModule
{
    private readonly string RemoteServiceName = "Default";

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddHttpClientProxies(
            typeof(CatOsApplicationContractsModule).Assembly,
            RemoteServiceName
        );

        context.Services.AddAutofac();
        context.Services.AddControllers();
        context.Services.AddEndpointsApiExplorer();
        context.Services.AddHttpContextAccessor();
        context.Services.AddScoped&lt;ScenarioManager&gt;();
        context.Services.AddSwaggerGen(options =>
        {
            options.AddSecurityDefinition(
                "Bearer",
                new Microsoft.OpenApi.Models.OpenApiSecurityScheme
                {
                    Name = "Authorization",
                    Type = Microsoft.OpenApi.Models.SecuritySchemeType.Http,
                    Scheme = "Bearer",
                    BearerFormat = "JWT",
                    In = Microsoft.OpenApi.Models.ParameterLocation.Header,
                    Description =
                        "Enter 'Bearer' [space] and then your token in the text input below.\n\nExample: 'Bearer 12345abcdef'",
                }
            );

            options.AddSecurityRequirement(
                new Microsoft.OpenApi.Models.OpenApiSecurityRequirement
                {
                    {
                        new Microsoft.OpenApi.Models.OpenApiSecurityScheme
                        {
                            Reference = new Microsoft.OpenApi.Models.OpenApiReference
                            {
                                Type = Microsoft.OpenApi.Models.ReferenceType.SecurityScheme,
                                Id = "Bearer",
                            },
                        },
                        new string[] { }
                    },
                }
            );
        });
        context.Services.AddHttpClient(
            "catos",
            (sp, client) =>
            {
                var scenarioManager = sp.GetRequiredService&lt;ScenarioManager&gt;();

                var configuration = sp.GetRequiredService&lt;IConfiguration&gt;();
                client.BaseAddress = new Uri(
                    configuration.GetValue&lt;string&gt;("RemoteServices:Default:BaseUrl")
                );
                var jwtToken = scenarioManager.GetOrCreate().StringData[
                    ScenarioContext.AccessToken
                ];
                client.DefaultRequestHeaders.Authorization =
                    new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", jwtToken);
            }
        );
    }

    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        var app = context.GetApplicationBuilder();
        var env = context.GetEnvironment();
        // Configure the HTTP request pipeline.
        if (env.IsDevelopment())
        {
            app.UseSwagger();
            app.UseSwaggerUI();
        }

        app.UseHttpsRedirection();

        // app.UseAuthorization();

        app.UseRouting(); // Added to enable endpoint routing

        app.UseEndpoints(endpoints => // Updated to use IEndpointRouteBuilder
        {
            endpoints.MapControllers();
        });
    }
}

I am trying to create webapplication that consume dynamic proxy , and when I run the app I get this error

System.AggregateException
  HResult=0x80131500
  Message=Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Volo.Abp.Http.ProxyScripting.IProxyScriptManager Lifetime: Transient ImplementationType: Volo.Abp.Http.ProxyScripting.ProxyScriptManager': Unable to resolve service for type 'Volo.Abp.Http.Modeling.IApiDescriptionModelProvider' while attempting to activate 'Volo.Abp.Http.ProxyScripting.ProxyScriptManager'.) (Error while validating the service descriptor 'ServiceType: Volo.Abp.Http.ProxyScripting.ProxyScriptManager Lifetime: Transient ImplementationType: Volo.Abp.Http.ProxyScripting.ProxyScriptManager': Unable to resolve service for type 'Volo.Abp.Http.Modeling.IApiDescriptionModelProvider' while attempting to activate 'Volo.Abp.Http.ProxyScripting.ProxyScriptManager'.)
  Source=Microsoft.Extensions.DependencyInjection
  StackTrace:
   at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
   at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
   at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
   at Program.&lt;&lt;Main&gt;$>d__0.MoveNext() in   TestHarness.Api.Host\Program.cs:line 18

This exception was originally thrown at this call stack: [External Code]

Inner Exception 1:

InvalidOperationException: Error while validating the service descriptor 'ServiceType: Volo.Abp.Http.ProxyScripting.IProxyScriptManager Lifetime: Transient ImplementationType: Volo.Abp.Http.ProxyScripting.ProxyScriptManager': Unable to resolve service for type 'Volo.Abp.Http.Modeling.IApiDescriptionModelProvider' while attempting to activate 'Volo.Abp.Http.ProxyScripting.ProxyScriptManager'.

Inner Exception 2:

InvalidOperationException: Unable to resolve service for type 'Volo.Abp.Http.Modeling.IApiDescriptionModelProvider' while attempting to activate 'Volo.Abp.Http.ProxyScripting.ProxyScriptManager'.

program.cs :

using Cao.CatOs.TestHarness.Api.Host.Modules;
using Volo.Abp;

var builder = WebApplication.CreateBuilder(args);

await builder.AddApplicationAsync&lt;CatOsHttpApiClientTestModule&gt;(options =>
{
    var configurationBuilder = new ConfigurationBuilder();
    configurationBuilder.AddJsonFile("appsettings.json", false);
    configurationBuilder.AddJsonFile("appsettings.secrets.json", true);

     options.Services.ReplaceConfiguration(configurationBuilder.Build());
    options.UseAutofac();
    options.ApplicationName = "test";
});


var application = builder.Build();
await application.InitializeAsync();

Console.WriteLine("Press ENTER to stop application...");
Console.ReadLine();

await application.WaitForShutdownAsync();

Module :

  public class CatOsHttpApiClientTestModule : AbpModule
  {
      private readonly string RemoteServiceName = "Default";

      public override void ConfigureServices(ServiceConfigurationContext context)
      {
          context.Services.AddHttpClientProxies(
              typeof(CatOsApplicationContractsModule).Assembly,
              RemoteServiceName
          );

          context.Services.AddAutofac();
          context.Services.AddControllers();
          context.Services.AddEndpointsApiExplorer();
          context.Services.AddHttpContextAccessor();
          context.Services.AddScoped&lt;ScenarioManager&gt;();
          context.Services.AddSwaggerGen(options =>
          {
              options.AddSecurityDefinition(
                  "Bearer",
                  new Microsoft.OpenApi.Models.OpenApiSecurityScheme
                  {
                      Name = "Authorization",
                      Type = Microsoft.OpenApi.Models.SecuritySchemeType.Http,
                      Scheme = "Bearer",
                      BearerFormat = "JWT",
                      In = Microsoft.OpenApi.Models.ParameterLocation.Header,
                      Description =
                          "Enter 'Bearer' [space] and then your token in the text input below.\n\nExample: 'Bearer 12345abcdef'",
                  }
              );

              options.AddSecurityRequirement(
                  new Microsoft.OpenApi.Models.OpenApiSecurityRequirement
                  {
                      {
                          new Microsoft.OpenApi.Models.OpenApiSecurityScheme
                          {
                              Reference = new Microsoft.OpenApi.Models.OpenApiReference
                              {
                                  Type = Microsoft.OpenApi.Models.ReferenceType.SecurityScheme,
                                  Id = "Bearer",
                              },
                          },
                          new string[] { }
                      },
                  }
              );
          });
          context.Services.AddHttpClient(
              "catos",
              (sp, client) =>
              {
                  var scenarioManager = sp.GetRequiredService&lt;ScenarioManager&gt;();

                  var configuration = sp.GetRequiredService&lt;IConfiguration&gt;();
                  client.BaseAddress = new Uri(
                      configuration.GetValue&lt;string&gt;("RemoteServices:Default:BaseUrl")
                  );
                  var jwtToken = scenarioManager.GetOrCreate().StringData[
                      ScenarioContext.AccessToken
                  ];
                  client.DefaultRequestHeaders.Authorization =
                      new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", jwtToken);
              }
          );
      }
Showing 1 to 10 of 22 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
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 12, 2025, 10:20