Base solution for your next web application

Activities of "Ricavir"

Answer

Hi @Ismcagdas,

Yes, it is possible to configure a custom host name on Azure CDN, it seems easy. But with ABP, I don't know how to proceed.

Do you mean that I don't need to change anything in my app settings/config ? Do I just need to create a DNS record to redirect all app requests to the CDN endpoint (server and client) ?

In fact, I would appreciate some guidance on how to implement a CDN with ABP. I'm using the same URL for server and client (angular) and tenant is being resolved from the URL (thanks to {TENANCY_NAME})

Sure,

Here is the logs :

WARN 2023-10-25 07:03:09,655 [25 ] me.Caching.Redis.AbpPerRequestRedisCache - IFeatureCollection has been disposed.
Object name: 'Collection'.
System.ObjectDisposedException: IFeatureCollection has been disposed.
Object name: 'Collection'.
at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
at Microsoft.AspNetCore.Http.DefaultHttpContext.get_Items()
at Abp.Runtime.Caching.Redis.AbpPerRequestRedisCache.TryGetValueAsync(String key)
WARN 2023-10-25 07:03:09,655 [25 ] me.Caching.Redis.AbpPerRequestRedisCache - IFeatureCollection has been disposed.
Object name: 'Collection'.
System.ObjectDisposedException: IFeatureCollection has been disposed.
Object name: 'Collection'.
at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
at Microsoft.AspNetCore.Http.DefaultHttpContext.get_Items()
at Abp.Runtime.Caching.Redis.AbpPerRequestRedisCache.TryGetValueAsync(String key)

Hi @Ismcagdas,

I still have these warnings wit Abp 8.2.0. This should have been fixed, no ?

Answer

Hi @Ismcagdas,

No, API and app are hosted in the same server. The main point is how do you manage {TENANCY_NAME} in the URL when using a CDN endpoint.

So I found a ticket mentioning this issue here : https://support.aspnetzero.com/QA/Questions/10676/Impersonation-does-not-work-when-deployed-to-Azure-as-single-solution#answer-66330984-19de-b804-a427-3a003e99f3d1

The workarround is working

But why this happened ? Is there other impacts linked to this ?

Hi,

Here is the issue : https://github.com/aspnetzero/aspnet-zero-core/issues/4667

Hi

Thank you very much @Ismcagdas :)

Sorry @Ismcagdas, I just saw that Hangfire is able to manage background jobs on multiple instances. I will try it and come back to you if I need some additional help. This ticket can be closed.

Hi @Ismcagdas, thank you for your feedback.

Can you provide an SQL command to do this stuff ? Or something similar ?

Hi @Ismcagdas,

It has been a while since the last time :)

In fact, WEBSITE_INSTANCE_ID is an environment variable available on Azure App Service VM's. So, yes, I can read it.

My problem is that I want to store it somewhere outside the VM, this is why I need your help. I was thinking to store it in cache (I'm using Redis) or in Azure blob storage.

What is your advise about this ? Can I access cache or azure storage before setting Configuration.BackgroundJobs.IsJobExecutionEnabled ?

My goal is to activate background job execution only in the first instance ; the one that will start the app. Therefore, if a new instance is pushed in by Azure (automatic scale), the background job execution will not be started twice.

Showing 1 to 10 of 224 entries