Activities of "enisn"

Hi Enisn, Thanks for the feedback on this. I will try this, but I thought it was bad practice to spool up new httpclients everytime it was needed and instead we should use httpclientfactory? Can I share what I have done so far for this point and get your feedback?

P.S before opening the question I tried for some hours and couldnt get any service back in configure service, always receive the exception

System.ArgumentNullException: 'Value cannot be null. (Parameter 'provider')'

Can you share more code? I can't understand from this line why your ServiceProvider is null

Hi @cxp920

Dynamic Proxy convention is camelCase. Can you try camilatest.books.book.getList({}) instead of camilatest.Books.book.getList({})?

Hi @ChetanKumbhar

You can configure IdentityServer4 for this.

You can use RefreshTokenExpiration parameter to do that operation.

Following section might help: http://docs.identityserver.io/en/latest/topics/refresh_tokens.html?highlight=expire#additional-client-settings

When you created a module with abp cli (abp new AwesomeModule -t module --preview) you'll see a host folder. You can debug projects under host folder. Those projects reference to your module projects.

Firstly Global-Features and Features aren't same thing.

Basically:

  • Features allows to manage features at runtime.
  • But Global-Featuers allows to manage features at development-time. It doesn't allow change features at runtime.

According to this information, If you want to change features at runtime, you have to implement Feature. You should use [RequiresFeature("FeatureName")] attribute over classes or methods. If that feature is not enabled, that method, or entire class won't work.

About DataSeeders, you can inject IFeatureChecker service to your DataSeederContributor and call IsEnabledAsync() method, check if feature is enabled and then do rest of operation.


Also you can use AsyncHelper to execute async actions in ConfigureServices:

var baseAddress = AsyncHelper.RunSync(() => settingManager.GetOrNullForCurrentTenantAsync("BaseAddress"));
httpClient.BaseAddress = new Uri(baseAddress);

Changing CurrentTenant and disabling IMultiTenant filter are ok in dataseeder. That is what we do also actually.


Also we're currently developing a micro-service example with ABP which is eShopOnAbp. It's still under development but we have implemented a background worker for Db Migrations. You may want to review that project.

Hi,

Have you tried to configure your HttpContext in ConfigureServices:

context.Services.AddTransient<HttpClient>(sp =>
{
    // Get services you need.
    var currentTenant = sp.GetService<ICurrentTenant>();
    var settingManager = sp.GetService<ISettingManager>();

    // Create instance of HttpClient
    var httpClient = new HttpClient();
    
    // Make your modifications here
    httpClient.DefaultRequestHeaders.Add("Tenant", currentTenant.Name);

    // Return it to DI Container, It'll inject where you use.
    return httpClient;
});

It's an unexpected behavior. We'll fix it in next release.

So your credit is refunded.

Hi yousef.h85

The version 5.0 hasn't a stable release right now. It targets net 6.0 and it hasn't stable release yet too.

I can't suggest to use pre-release versions on Production.

There is a migration guide you can always follow instructions to upgrade to abp 5.0: https://docs.abp.io/en/abp/5.0/Migration-Guides/Abp-5_0


By the way, My personally suggestion is: If you development lasts more than 2 months you can start with ABP 5.0, stable version will be already released in 2 months.

Showing 731 to 740 of 787 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.2.0-preview. Updated on February 17, 2026, 09:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.