Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "firnas"

No. The external service does not have the tenant id.

This function should run periodically and check the database for device unlock requests. When a record is found, the job should pick it up and call a external service to unlock the device. The parameters for the request is stored tenant wise. (e.g. the dealer no is chaning from tenant to tenant).

If the device is unlocked, then a push notification is sent via App center to the mobile.

Below is the App setting code,

public static class PasstimeManagement { public const string PasstimeAddress = "PasstimeAddress"; public const string Password = "App.Passtime.Password"; public const string UserName = "App.Passtime.UserName"; public const string DealerNo = "App.Passtime.DealerNo"; }

Below is the App settings provider code,

private IEnumerable<SettingDefinition> GetPasstimeSettings() { return new[] { new SettingDefinition(AppSettings.PasstimeManagement.PasstimeAddress, GetFromAppSettings(AppSettings.PasstimeManagement.PasstimeAddress)), new SettingDefinition(AppSettings.PasstimeManagement.Password, GetFromAppSettings(AppSettings.PasstimeManagement.Password, ""), scopes: SettingScopes.Tenant), new SettingDefinition(AppSettings.PasstimeManagement.UserName, GetFromAppSettings(AppSettings.PasstimeManagement.UserName, ""), scopes: SettingScopes.Tenant), new SettingDefinition(AppSettings.PasstimeManagement.DealerNo, GetFromAppSettings(AppSettings.PasstimeManagement.DealerNo, ""), scopes: SettingScopes.Tenant) }; }

Below is the code in the job,

[UnitOfWork] public virtual async Task SendDeviceUnlockNotification() { using (_unitOfWorkManager.Current.SetTenantId(_abpSession.TenantId)) { string dealerNo = await _settingManager.GetSettingValueAsync(PasstimeManagement.DealerNo); ///more lines below } }

Tha job is a recurring job and i have registerd it in the WebCoreModule. How can i then pass in the tenant id?

I injected the AbpSession but the tenant id returned is null.

i enclosed the code block in the using statement. as below,

`using (_unitOfWorkManager.Current.SetTenantId(_abpSession.TenantId)) {

}`

Its related to Tenant

Hi,

I have a hangfire job which calls a class in the Core project. This class calls the settings manager to get a setting value.

string dealerNo = await _settingManager.GetSettingValueAsync(MyConstants.DealerNo);

This returns a empty string as the dealer no. Is there any configuration that needs to be done to get Settings manager to work with hangfire?

Thank you. The solution worked.

Hi,

I have a to register a hangfire recurrent job in the PostInitialize method in the module. The job class constructor should be resolved by dependancy injection. I have used the following code to register the reccurent job in the module.

JobStorage.Current = new SqlServerStorage(_appConfiguration.GetConnectionString("Default")); RecurringJob.AddOrUpdate<ISendNotificationJob>(x => x.SendDeviceUnlockNotification(), Cron.MinuteInterval(10));

How ever when the SendDeviceUnlockNotification method is called it throws a object disposed exception. Can anyone please help me on this.

public SendNotificationJob(IRepository&lt;Payment> paymentRepository

, IPasstimeDomainService passtimeDomainService , IAppCentre appCentre , UserManager userManager) { _paymentRepository = paymentRepository; _passtimeDomainService = passtimeDomainService; _appCentre = appCentre; _userManager = userManager;

    }

Hi, What is the best / feasible way to upgrade the ASP.NET ZERO project, as there could be multiple ways?

We have tried upgrading from 3.5 to 4.1 and getting number of errors. There are issues when running the Angular project, although there is no build errors in the backend project. Below is the screenshot of console while running the upgraded app.

We are trying to upgrade in 2 different ways.

  1. Upgrade Nuget packages on old project
  2. Merge code from old project to latest version of ASP.NET ZERO template

Please advise

Showing 51 to 60 of 64 entries