Activities of "PerigisettiVenkateswaraRao"

<lpx-sidebar> <profile-widget class="floating-widget"> </profile-widget> </lpx-sidebar>

and have custom method to backToImpersonator() how can i go back to impersonator

I am using the above code to display login user info and impersonation option to the left side. i am able to see the back button but when i click on that nothing is happening

We have relocated the logout option to the bottom of the left side menu in our Angular application and hidden the right sidebar. After making these changes, we are no longer able to revert to the original user after impersonation.

Answer

okay Thank you

Question

Currently we hold team plan + two additional developer license in ABP . we could like to downgrade our license to team plan + one developer seat . can you pls change existing license . so that we can proceed with the payment .

I have installed the Volo.Abp.Http.Client.IdentityModel package in the Host module of Service A and configured it in HttpApi.HostModule.cs as outlined in the documentation.

Please share your code and appsettings configuration

Please confirm if the appsettings below look correct, and I will proceed to share the code. appsettings.json (Service A)

"RemoteServices": {
  "Default": {
    "BaseUrl": "https://localhost:44325"
  },
  "ServiceB": {
    "BaseUrl": "https://localhost:44371/",
    "UseCurrentAccessToken": true
  }
},
"IdentityClients": {
  "Default": {
    "GrantType": "client_credentials",
    "ClientId": "AdministrationService",
    "ClientSecret": "1q2w3e*",
    "Authority": "https://localhost:44322",
    "Scope": "Service B"
  }
},

Here is a similar question, can you share your code

https://abp.io/support/questions/2803/VoloAbpHttpClientAbpRemoteCallException-Unsupported-Media-Type

After modifying it at the controller level, it worked. However, I am still unable to access CurrentUser in Service B. Additionally, the Service B method is only triggered when I annotate the API method with AllowAnonymous. I have installed the Volo.Abp.Http.Client.IdentityModel package in the Host module of Service A and configured it in HttpApi.HostModule.cs as outlined in the documentation.

  • ABP Framework version: v8.2.1
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separated
  • Exception message and full stack trace:
  • Steps to reproduce the issue: In my microservice template, I need to call the Service B from the Service A. Following the documentation for Synchronous Interservice Communication, I implemented the integration. However, when attempting to call the API, I encountered the following exception
Volo.Abp.Http.Client.AbpRemoteCallException: 'Unsupported Media Type'

you can check this document to know how to add a custom filter.

https://abp.io/docs/latest/framework/infrastructure/data-filtering

I have already gone through the documentation when i try to keep the below code in dbcontext getting no suitable method to overload error on CreateFilterExpression method

protected bool IsBranchFilterEnabled => DataFilter?.IsEnabled<IBranchEntity>() ?? false;

protected int? CurrentBranchId => BranchContext?.CurrentBranchId; 

protected override bool ShouldFilterEntity<TEntity>(IMutableEntityType entityType)
{
    if (typeof(IBranchEntity).IsAssignableFrom(typeof(TEntity)))
    {
        return true; // Apply filter to all entities implementing IBranchEntity
    }

    return base.ShouldFilterEntity<TEntity>(entityType);
}

protected override Expression<Func<TEntity, bool>> CreateFilterExpression<TEntity>(ModelBuilder modelBuilder)
{
    var expression = base.CreateFilterExpression<TEntity>(modelBuilder);

    if (typeof(IBranchEntity).IsAssignableFrom(typeof(TEntity)))
    {
        // Build the filter for BranchId
        Expression<Func<TEntity, bool>> branchFilter = e =>
            !IsBranchFilterEnabled || 
            (EF.Property<int?>(e, "BranchId") == CurrentBranchId || EF.Property<int?>(e, "BranchId") == null);

        // Combine the new filter with existing filters
        expression = expression == null ? branchFilter : QueryFilterExpressionHelper.CombineExpressions(expression, branchFilter);
    }

    return expression;
}
  • ABP Framework version: v8.2.1
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth server separated angular
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I need to create a custom filter to filter my entity based on BranchId. The BranchId will be received as a List<long> from the request headers or parameters. Here's the approach I followed:

  1. Created IBranchEntity Interface:

    • Placed this interface in the Domain.Shared folder.
    • It includes a BranchId property, which I inherited in the relevant entity.
  2. Defined IBranchContext Interface:

    • This interface includes a CurrentBranchId property to store the branch ID.
    • Implemented the interface in a BranchContext class in the Http.Host project with the necessary logic.
  3. Entity Framework Filtering Logic:

    • Created a file in the EntityFramework folder to define filtering logic for entities.
  4. Service Registration:

    • Registered the IBranchContext in the HostModule.cs under the ConfigureServices method as follows:
      context.Services.AddHttpContextAccessor();
      context.Services.AddScoped<IBranchContext, BranchContext>();
      
  5. Database Context Changes:

    • Updated the ClinicServiceDbContext constructor to accept the IBranchContext.
      private readonly IBranchContext _branchContext;
      
      public ClinicServiceDbContext(
          DbContextOptions<ClinicServiceDbContext> options,
          IBranchContext branchContext
      ) : base(options)
      {
          _branchContext = branchContext;
      }
      
      protected override void OnModelCreating(ModelBuilder builder)
      {
           base.OnModelCreating(builder);
      
           builder.ConfigureClinicService();
      
           builder.ConfigureBranchFilterForEntities(_branchContext);
      }
      

After implementing the above, the filter is correctly identifying entities with the BranchFilter when the application is initially loaded. However, it is not being triggered for subsequent requests.

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 18, 2025, 07:10