Activities of "maliming"

hi

Please add the below code to your project and reproduce the problem and share the Logs.txt

[Authorize]
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(MyGdprRequestAppService), typeof(IGdprRequestAppService), typeof(GdprRequestAppService))]
public class MyGdprRequestAppService : GdprRequestAppService
{
    public MyGdprRequestAppService(
        IGdprRequestRepository gdprRequestRepository,
        IDistributedEventBus eventBus,
        IOptions<AbpGdprOptions> gdprOptions,
        IDistributedCache<DownloadTokenCacheItem, string> downloadTokenCache) :
        base(gdprRequestRepository, eventBus, gdprOptions, downloadTokenCache)
    {
    }


    public async override Task PrepareUserDataAsync()
    {
        var latestRequestTime = await GdprRequestRepository.FindLatestRequestTimeOfUserAsync(CurrentUser.GetId());

        var isNewRequestAllowedInternal = latestRequestTime.HasValue && Clock.Now - latestRequestTime > GdprOptions.RequestTimeInterval;
        if (!isNewRequestAllowedInternal)
        {
            Logger.LogError($"Clock.Now: {Clock.Now} - latestRequestTime: {latestRequestTime} - RequestTimeInterval: {GdprOptions.RequestTimeInterval}");
            throw new BusinessException(GdprErrorCodes.NotAllowedForRequest);
        }

        var gdprRequest = new GdprRequest(GuidGenerator.Create(), CurrentUser.GetId(), Clock.Now.AddMinutes(GdprOptions.MinutesForDataPreparation));

        await GdprRequestRepository.InsertAsync(gdprRequest);

        await EventBus.PublishAsync(new GdprUserDataRequestedEto
            {
                UserId = CurrentUser.GetId(),
                RequestId = gdprRequest.Id
            }
        );
    }

    [AllowAnonymous]
    public async override Task<IRemoteStreamContent> GetUserDataAsync(Guid id, string token)
    {
        var downloadToken = await DownloadTokenCache.GetAsync(token);
        if (downloadToken == null || downloadToken.RequestId != id)
        {
            throw new AbpAuthorizationException();
        }

        await DownloadTokenCache.RemoveAsync(token);

        var request = await GdprRequestRepository.GetAsync(id, true);
        if (Clock.Now < request.ReadyTime)
        {
            Logger.LogError($"Clock.Now: {Clock.Now} - ReadyTime: {request.ReadyTime}");
            throw new BusinessException(GdprErrorCodes.DataNotPreparedYet)
                .WithData("GdprDataReadyTime", request.ReadyTime.ToShortTimeString());
        }

        using (var memoryStream = new MemoryStream())
        {
            using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, true))
            {
                var infos = request.Infos;
                foreach (var info in infos)
                {
                    var file = archive.CreateEntry(GuidGenerator.Create() + ".json", CompressionLevel.Fastest);
                    using (var entry = file.Open())
                    {
                        var byteArr = Encoding.UTF8.GetBytes(info.Data);
                        await entry.WriteAsync(byteArr, 0, byteArr.Length);
                    }
                }
            }
            memoryStream.Seek(0, SeekOrigin.Begin);

            var ms = new MemoryStream();
            await memoryStream.CopyToAsync(ms);
            ms.Seek(0, SeekOrigin.Begin);

            return new RemoteStreamContent(ms, "PersonalData.zip", "application/zip");
        }
    }
}

This seems to be a problem with the Clock or time zone. Do you have any relevant changes?

hi

Please share an online URL I will test it. Please share the full logs(Logs.txt)

liming.ma@volosoft.com

Answer

You can remove thesePre-Built Application Modules from the project. then update the migrations.

https://commercial.abp.io/modules

hi

Can you reproduce it on your local?

How can I reproduce it with a new template project?

Answer

hi

There is no such document.

hi

You can bind a wildcard domain and get a wildcard SSL certificate for it.

https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/wildcard-host-header-support

Wildcard SSL Certificate

https://www.google.com/search?q=wildcard+ssl+certificate&oq=Wildcard+SSL+Certificate

Answer

but it is not working with application module.

You can complete removing the AbpCachingStackExchangeRedisModule module from your template.

hi

You can try to get the client_id of CurrentPrincipal in application services.

Or add some custom policy

https://support.abp.io/QA/Questions/1112/How-to-grant-access-to-Identity-Server-Client-on-multi-tenancy#answer-62c3b9e0-79a5-c909-476a-39fb982b4fd6

hi

yes

https://support.abp.io/QA/Questions/1112/How-to-grant-access-to-Identity-Server-Client-on-multi-tenancy#answer-9c1da15b-8264-8fd5-d73a-39fb93d63fd0

https://github.com/abpframework/abp/issues/10316

Showing 7481 to 7490 of 11558 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.1.0-preview. Updated on December 25, 2025, 06:16
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.