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

Activities of "Ricavir"

Hi,

While using Metronic 4 with angular and asp.net core, I've built a specific component for horizontal-timeline. It was working great. I've upgraded my project with latest aspnetzero version and with metronic 5. In metronic 5, it is not available in the demo templates.

I also noticed that you removed it from aspnetzero dashboard.

Do you know if this component will be available soon for metronic 5 ?

Is it possible to get the horizontal-timeline work again (with metronic 4 assets) and how will you do it ?

Any advice would be welcome :)

Hi,

I'm testing a new feature that needs to notify every user of current tenant. I've added my notification definition to the notification provider.

I've got following exception when sending it :

ERROR 2017-11-23 08:45:50,525 [10 ] Mvc.ExceptionHandling.AbpExceptionFilter - Can not set TenantId to 0 for IMustHaveTenant entities! Abp.AbpException: Can not set TenantId to 0 for IMustHaveTenant entities!

I try to set tenantId with _unitOfWorkManager.Current.SetTenantId(x) but same exception

I try to launch the notification from different locations : from AppService (Exception raised) and from BackgroundWorker (Exception not raised but notification not sent as well)

I try with existing notification "SendMessageAsync" (existing on your template project for test purpose) and I've got same exception.

I must miss something because when I create a new User, the welcome notification is sent and received by this new user.

Any idea ?

Hi,

I'm implementing a background worker class to schedule some tasks automatically. I took as code example the class "SubscriptionExpirationCheckWorker" on MultiTenancy namespace.

I'm able to search for tenants

var tenantsForEventSchedule = _tenantRepository.GetAllList(tenant => tenant.IsActive);

and also to get some tenant settings.

But when I try to search for other entities, an exception is raised with message "cannot access a disposed object" relative to the db context. The system try to access the database but the connection ha been disposed before.

I've read aspnetboilerplate documentation about UnitOfWork ; therefore, I've added [UnitOfWork] attribute before DoWork method I still have the same exception.

How can I fix this ?

Here is an extract of the code :

public class EventSchedulerWorker : PeriodicBackgroundWorkerBase, ISingletonDependency
    {
        private const int CheckPeriodAsMilliseconds = 1 * 60 * 60 * 100; // demo 6 minutes

        private readonly IRepository<Tenant> _tenantRepository;
        private readonly IRepository<ContractSchedule, long> _contractScheduleRepository;
        private readonly TenantManager _tenantManager;
        private readonly IAppNotifier _appNotifier;

        public EventSchedulerWorker(
            AbpTimer timer,
            IRepository<Tenant> tenantRepository,
            IRepository<ContractSchedule, long> contractScheduleRepository,
            TenantManager tenantManager,
            IAppNotifier appNotifier)
            : base(timer)
        {
            _tenantRepository = tenantRepository;
            _contractScheduleRepository = contractScheduleRepository;
            _tenantManager = tenantManager;
            _appNotifier = appNotifier;

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

            LocalizationSourceName = LogisavConsts.LocalizationSourceName;
        }

        [UnitOfWork]
        protected override async void DoWork()
        {
            var tenantsForEventSchedule = _tenantRepository.GetAllList(tenant => tenant.IsActive);

            foreach (var tenant in tenantsForEventSchedule)
            {
                try
                {
                    if (await SettingManager.GetSettingValueForTenantAsync<bool>(AppSettings.TenantEvent.Scheduler_Activated, tenant.Id) == true)
                    {
                        //define period to search contracts
                        var today = Clock.Now.Date;
                        int dayCountBeforeEventCreation = await SettingManager.GetSettingValueForTenantAsync<int>(AppSettings.TenantEvent.Scheduler_DayCount_BeforeEventCreation, tenant.Id);
                        var startDate = today.AddDays(-dayCountBeforeEventCreation);
                        bool includeSuspendedContracts = await SettingManager.GetSettingValueForTenantAsync<bool>(AppSettings.TenantEvent.Scheduler_SuspendedContractIncluded, tenant.Id);                        

                        var contractsFound = _contractScheduleRepository
                            .GetAll()
                            .Include(c => c.Contract)
                            .Where(cs => cs.Contract.IsActive == true)
                            .WhereIf(!includeSuspendedContracts, cs => cs.Contract.IsSuspended == false)
                            .Where(cs => cs.ScheduleDate >= startDate && cs.ScheduleDate <= today)
                            .ToList();

             >>>>>>>>>>>> EXCEPTION HERE : "cannot access a disposed object"

Hi,

I want to retrieve users that are included in, at least, one organization unit. I've looked to abp docs but didn't found.

Right now, I'm using following code :

//Find users in OU
            foreach(var user in await UserManager.Users.ToListAsync())
            {
                if((await UserManager.GetOrganizationUnitsAsync(user)).Count() > 0)
                {
                    employeeIds.Add(user.Id);
                }
            }

Can I achieve that in a more efficient way ?

Hi,

I've published my project (ASP.NET CORE + Angular 4 upon .NET Framework 4.6) on A2Hosting.com within a windows shared server. Application is working fine (database access, SIGNALR, emailing...). That said, I still need to refactore some code on my side to achieve better performance.

Nevertheless, application pages are loading sometimes very slow sometimes faster (taking into account lazy loaded modules managed by angular routing).

I asked A2Hosting support about this page loading and database access differences. They answered that my application was published over FTP in SDC (self-contained deployment) with an EXE output. And EXE application are blocked in their side because of security policy.

Fine to me, but actually my application is targetting .NET Framework 4.6 (mainly because of SIGNALR support). You can have a look to attached screenshot. But the web.config file is mentionning ASP.NET CORE :

<aspNetCore processPath=".\xxx.Web.Host.exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />

So the question is : what is the application output type ? ASP.NET CORE or ASP.NET ? Do you use to publish your applications without EXE file ? How can I publish in FDD (framework dependant deployment) if I'm not targetting ASP.NET CORE ?

Currently, I'm using file system deployment with visual studio and transfering generated files over FTP ? Is it also you way of publishing ? I've tried web deploy but I'm having authorization issue... What is your advice ?

Sorry for all these questions, I'm not an expert at all on server mangement and deployment process ; and a little bit lost also ;)

Hi,

I have a combined solution with angular and ASP.NET core. I was able to publish my app easily previously. My project is growing and compilation process needs more memory. Therefore, when I publish my app now I have an exception due to lack of memory.

This is a known issue : I'm able to build separatly my angular app with this command : <a class="postlink" href="https://github.com/angular/angular-cli/issues/5618">https://github.com/angular/angular-cli/issues/5618</a> node --max-old-space-size=4096 ./node_modules/@angular/cli/bin/ng build --prod

How can I set this command to be executed in my visual studio solution when publishing my app ?

Right now, the build script is launching command ng build --prod alone and I don't know how to change it...

Hi,

I need to have a unique and continuous ID per tenant. I'm building an invoicing module and each tenant needs to have continuous ID's for their invoices (eg : 1,2,3,4,5...). I can't have any number missing in this serie (like 1,2,4,5 >> this must not be possible) I can't use the primary key of invoice table has it is shared by all tenants.

What would you recommend to do this ?

I was planning to implement this in Invoice AppService while creating an invoice entity. Before creating the entity, I plan to find the highest ID for current tenant and increment it ; then save entity. Is it the righ approach or do you have other suggestions ?

Tks

Hi,

I would like to use bootstrap-switch component in my UI. I tried following code from metronic but didn't result :

<div class="form-group">
          <label class="control-label col-md-3">Text</label>
          <div class="col-md-9">
                  <input type="checkbox" class="make-switch" data-on-text="Yes" data-off-text="No">
                   <input type="checkbox" class="make-switch" data-on-text="1" data-off-text="0"> 
          </div>
</div>

I saw bootstrap switch reference in angular.cli and package.json... did you already tried to implement such component ? Do you have any tip on that ? Maybe with an angular directive ?

Cheers

Hi,

I would appreciate your help on following issue :

I'm using IEmailSender to send emails on tenant side (my project is angular2 with .NET 4.6) I'm able to send simple mails without any issue.

But, when adding an attachment (with MailMessage class), the email is received but without attachment... I have no log error about this. Is there something that could block attachments ?

Another issue, is that I'm changing the Sender attribute of MailMessage before sending an email on tenant side; but I'm receiving the email with sender setted in host configuration. How can I change this behavior to have specific sender (different from host setting) ?

Hello,

I'm trying to implement ngPrime Editor component as you did with the DemoUI page on last aspnetzero release. I've installed quill with npm (npm install quill --save) I've also added JS and CSS reference on angular-cli file : "scripts": [... "../node_modules/quill/dist/quill.js"], "styles": [ ... "../node_modules/quill/dist/quill.core.css", "../node_modules/quill/dist/quill.snow.css"],

I imported the component in my angular module.

I have the following issue when I try to open a page with editor included : "Quill is not defined"

I try to add a reference on typings but still same issue.

Did you had this issue also on your DemoUI page ? Any idea to solve this ?

Showing 71 to 80 of 93 entries