Activities of "sinancondo"

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<ScenarioManager>();
        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<ScenarioManager>();

                var configuration = sp.GetRequiredService<IConfiguration>();
                client.BaseAddress = new Uri(
                    configuration.GetValue<string>("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.<<Main>$>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<CatOsHttpApiClientTestModule>(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<ScenarioManager>();
          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<ScenarioManager>();

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

Can you please share your hardware configuration that the Redis server was running on ? (CPU/RAM)

Application was sent to your email , please let me know if you have any finding.

**Our team is now fully blocked, and we need either a fix or an efficient work around **

We have upgraded to v 9.1.1 and we have found the enum is not generating right although in this bug it is marked as resolved, but we have exact same problem , all enum types are just generated as enum instead of their strong type. https://github.com/abpframework/abp/issues/21995 please advise , this is urgent

I have to get approval to share the project , can you confirm you got the log file ? also would you be able to point me where in the source code this method use cache in ABP source code ? I want to have a look.

I shared the log where redis is run locally Please check your email

Sound like v 9.1.1 is dependent on v 1.8.17 , please check the image, also if I update to 1.8.18 I get version conflict because v 9.1.1 want Hangfire v 1.8.17. please let me know if I missed something

As for reverting to our original version 1.8.14 , that not possible because v9.1.1 require 1.8.17 version as we stated above. Please advise. thanks

We run it on multiple machine even on azure instance, the Redis is not busy and there is no explanation why request takes all this time, and when we disable the Redis the request get served faster

Showing 11 to 20 of 24 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 05, 2025, 12:34
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.