Base solution for your next web application

Activities of "QuickApp"

HangfireService.cs (Web.Core) public class HangfireService { public static void InitializeJobs() { RecurringJob.AddOrUpdate<QTenantInvoiceJob>(job => job.Execute(0), $"00 00 {QCloudConsts.InvoiceCreationDay} * *"); RecurringJob.AddOrUpdate<QTenantLockJob>(job => job.Execute(0), $"00 01 {QCloudConsts.NotPaidInvoiceAndLockingDay} * *"); RecurringJob.AddOrUpdate<FreeEditionControlJob>(job => job.Execute(0), "00 02 * * *"); return; } }

Startup.cs (Web.Host) public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { .... if (WebConsts.HangfireDashboardEnabled) { //Hangfire dashboard &server(Enable to use Hangfire instead of default job manager) app.UseHangfireDashboard(WebConsts.HangfireDashboardEndPoint, new DashboardOptions { Authorization = new[] {new AbpHangfireAuthorizationFilter(AppPermissions.Pages_Administration_HangfireDashboard)} }); app.UseHangfireServer(); HangfireService.InitializeJobs(); } .... }

What is your product version? v10.2.0 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .Net Core

Hi everyone,

When logging in and logging out from Tenant's subdomain, a cookie named Abp.TenantId is written.

This then gives an error when logging into the host from the main domain or trying to create a new customer.

How should I find a solution for this situation?

Hi @ismcagdas, I sent the relevant email.

Best regards.

Hi @ismcagdas, I have replied to your mail. Yes, normally it should not write cookies. But we have such a situation.

Best regards.

What is your product version? v10.2.0 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .Net Core

Hi, SubscriptionExpireEmailNotifierWorker class sends mail 10 days before the edition expires. But it sends the same e-mail 2 times with an interval of 1-2 hours.

I couldn't understand what the problem is, the codes are as follows:

using System;
using System.Diagnostics;
using Abp.Configuration;
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.Threading;
using Abp.Threading.BackgroundWorkers;
using Abp.Threading.Timers;
using Abp.Timing;
using QCloud.Authorization.Users;
using QCloud.Configuration;

namespace QCloud.MultiTenancy
{
    public class SubscriptionExpireEmailNotifierWorker : PeriodicBackgroundWorkerBase, ISingletonDependency
    {
        private const int CheckPeriodAsMilliseconds = 1 * 60 * 60 * 1000 * 24; //1 day
        
        private readonly IRepository<Tenant> _tenantRepository;
        private readonly UserEmailer _userEmailer;

        public SubscriptionExpireEmailNotifierWorker(
            AbpTimer timer,
            IRepository<Tenant> tenantRepository,
            UserEmailer userEmailer) : base(timer)
        {
            _tenantRepository = tenantRepository;
            _userEmailer = userEmailer;

            Timer.Period = CheckPeriodAsMilliseconds;
            Timer.RunOnStart = true;

            LocalizationSourceName = QCloudConsts.LocalizationSourceName;
        }

        protected override void DoWork()
        {
            var subscriptionRemainingDayCount = Convert.ToInt32(SettingManager.GetSettingValueForApplication(AppSettings.TenantManagement.SubscriptionExpireNotifyDayCount));
            var dateToCheckRemainingDayCount = Clock.Now.AddDays(subscriptionRemainingDayCount).ToUniversalTime();

            var subscriptionExpiredTenants = _tenantRepository.GetAllList(
                tenant => tenant.SubscriptionEndDateUtc != null &&
                          tenant.SubscriptionEndDateUtc.Value.Date == dateToCheckRemainingDayCount.Date &&
                          tenant.IsActive &&
                          tenant.EditionId != null
            );

            foreach (var tenant in subscriptionExpiredTenants)
            {
                Debug.Assert(tenant.EditionId.HasValue);
                try
                {
                    AsyncHelper.RunSync(() => _userEmailer.TrialIsAboutToExpire(tenant.Id, dateToCheckRemainingDayCount,(int)tenant.EditionId));
                }
                catch (Exception exception)
                {
                    Logger.Error(exception.Message, exception);
                }
            }
        }
    }
}

What is your product version? v10.2.0 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .Net Core

Hi, A customer of ours had a problem with e-mail verification and we could not understand why.

The relevant log record is as follows:

2021-11-18 13:08:47,037 [43 ] Mvc.ExceptionHandling.AbpExceptionFilter - The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at Abp.Runtime.Security.SimpleStringCipher.Decrypt(String cipherText, String passPhrase, Byte[] salt, Nullable'1 keySize, Byte[] initVectorBytes) at QCloud.Authorization.Accounts.AccountAppService.ResolveTenantId(ResolveTenantIdInput input) in /home/ec2-user/workspace/QCloud/src/QCloud.Application/Authorization/Accounts/AccountAppService.cs:line 85 at lambda_method2984(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask'1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Where can I find the parameters you request? When I check the database, the user appears to be approved.

However, the tenant informed us that he received an error message and no activation.

Hi @musa.demir I will follow the situation from the relevant link, thanks.

What is your product version? v10.2.0 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .Net Core

Hi, I created a new tenant for testing purposes. When I tried to login with admin and password information, it threw me on the host screen on my first try. (The host login also uses the same username and password.) In my next attempts, it correctly directed me to the relevant tenant screen.

https://imgyukle.com/f/2021/11/23/k1Ul5c.png

Also, when I try a tenant name that does not exist (xx.site.com), I can log in with the host information. Shouldn't it redirect me to the main domain?

I sent more detailed information to [email protected] as an e-mail.

If there is a tenant, is it not necessary to add a tenantId in the SQL query? As you said, if there is no tenant, it must be logged in as a host.

In the example I gave, there is a tenant and it enters as a host. Isn't this a bug?

Showing 31 to 40 of 43 entries