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

Activities of "carelearning"

THank you for your response. I could create a sample project, but the same behavior exists here: http://qasample.aspnetboilerplate.com/Account/Login?ReturnUrl=/ If you go there, press F12 to bring up a console and run this code:

$.blockUI({ message: '<h1> Just a moment...</h1>' });

The result is a blocked GUI, but no message. To be more accurate, the <div> with the message is there, but due to CSS it is not visible.

If you go to http://malsup.com/jquery/block/ and run the same code, then you will get a blocked GUI with a message because the resulting CSS is slightly different.

I can find a way to code around this, but I thought I might be using it incorrectly. Maybe there is a way to accomplish this using abp (https://aspnetboilerplate.com/Pages/Documents/Javascript-API/UI-Block-Busy

Answers to your quesitons:

  1. No error
  2. Yes, it does block
  3. I do not see it listed in packages.config in my web project

Thank you again for your help.

@aaron Thanks! This worked. Our code for those interested:

public class CustomOrganizationUnitManager : OrganizationUnitManager
    {
        public CustomOrganizationUnitManager(IRepository<OrganizationUnit, long> organizationUnitRepository) : base(organizationUnitRepository)
        {
        }

        protected override Task ValidateOrganizationUnitAsync(OrganizationUnit organizationUnit)
        {
            return Task.CompletedTask;
        }
    }

usage

public OuManager(IRepository<OrganizationUnit, long> organizationUnitRepository,
                         IRepository<UserOrganizationUnit, long> userOrganizationUnitRepository)
        {
          _organizationUnitManager = new CustomOrganizationUnitManager(organizationUnitRepository);    
         _organizationUnitRepository = organizationUnitRepository;
         _userOrganizationUnitRepository = userOrganizationUnitRepository;
        }

Dear @ismcagdas ,

Sorry for the confusion. We tested it again and those changes are working as you stated they would.

Thanks for the solution.

@ismcagdas We wanted to check with you to see if you received the email. Were you able to download the solution and run it?

Thanks again.

Hello,

We have created a sample project and sent an email to your Volosoft's "info" email account. This email contains instructions for how to download the solution that will illustrate the problem. Please let us know if you have any trouble or concerns.

Thank you.

@ismcagdas Thank you for looking into this

@aaron Thanks for your response. When we add:

[MultiTenancySide(MultiTenancySides.Host)]

to our host file and

[MultiTenancySide(MultiTenancySides.Tenant)]

to our tenant file we get this error now instead of the error above: The specified cast from a materialized 'System.Data.Entity.Core.Objects.MaterializedDataRecord' type to the '<>f__AnonymousType16`2[MyCompanyName.AbpZeroTemplate.Departments.Department,Abp.Authorization.Users.UserOrganizationUnit]' type is not valid.

We also noticed that this is not just on groupJoin statements, but regular join statements. Any thoughts or suggestions would be greatly appreciated.

Thanks again.

@ismcagda It looks like we gave you the version according to ABP Packages and not the product version. Sorry. We went from 5.3.0.0 to 5.4.0.0. Which means we were using the ABP 3.5.0.0 packages from this commit 9f6723952946c5f3faedfdbb079d318d34e7b6a3; but after merging commit 8cf59103b5d0c014f6604042b4ce5ed7246c1f03 it now includes the ABP 3.6.1.0 packages.

@alper When we roll back to our previous commit everything works as expected.

We are using the Single Deployment - Multiple Database Strategy ( <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy">https://aspnetboilerplate.com/Pages/Doc ... ti-Tenancy</a> ).

We have added two custom properties to an organization unit (locked and customKey) to our Department entity:

namespace MyCompanyName.AbpZeroTemplate.Departments
{
    using OrganizationUnits;

    public class Department : OrganizationUnitMap
    {
        public const int MaximumIdLength = 50;
        public const int MaximumTitleLength = 50;

        public string CustomKey { get; set; }
        public bool Locked { get; set; }

        public Department()
        {
        }

        public Department(long organizationUnitId, string cutomKey, bool locked = false)
        {
            CustomKey = cutomKey;
            Locked = locked;
            OrganizationUnitId = organizationUnitId;            
        }
    }
}

The query we wrote joins this entity via the OrganizationUnit navigation property to the assignments table (AbpUserOrganizationUnits) so we can determine which users have which departments. All of these entities should belong to the same TenantDB context.

Tenant Context:

public class AbpZeroTemplateTenantDbContext : AbpZeroTenantDbContext<Role, User>
    {
    		// removed other dbsets
    
        public virtual IDbSet<Department> Departments { get; set; }
        

        #region Constructors
        public AbpZeroTemplateTenantDbContext()
            : base("Tenant")
        {
        }

        public AbpZeroTemplateTenantDbContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        {
        }

        public AbpZeroTemplateTenantDbContext(DbConnection existingConnection)
            : base(existingConnection, false)
        {
        }

        public AbpZeroTemplateTenantDbContext(DbConnection existingConnection, bool contextOwnsConnection)
            : base(existingConnection, contextOwnsConnection)
        {
        }
        #endregion

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

						// removed other configurations
           
            modelBuilder.Configurations.Add(new DepartmentConfiguration());
            
        }
    }

Host Context

[DefaultDbContext]
    public class AbpZeroTemplateHostDbContext : AbpZeroHostDbContext<Tenant, Role, User>
    {
        /* Define an IDbSet for each entity of the application */

        public virtual IDbSet<BinaryObject> BinaryObjects { get; set; }

        public virtual IDbSet<Friendship> Friendships { get; set; }

        public virtual IDbSet<ChatMessage> ChatMessages { get; set; }

        public virtual IDbSet<EmailAddressDomain> EmailAddressDomains { get; set; }
        public virtual IDbSet<FileType> FileTypes { get; set; }
        public virtual IDbSet<TenantUsername> TenantUsernames { get; set; }

        public AbpZeroTemplateHostDbContext()
            : base("Host")
        {
        }

        public AbpZeroTemplateHostDbContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        {
        }

        public AbpZeroTemplateHostDbContext(DbConnection existingConnection)
            : base(existingConnection, false)
        {
        }

        public AbpZeroTemplateHostDbContext(DbConnection existingConnection, bool contextOwnsConnection)
            : base(existingConnection, contextOwnsConnection)
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            modelBuilder.Configurations.Add(new EmailAddressDomainConfiguration());
            modelBuilder.Configurations.Add(new FileTypeConfiguration());
            modelBuilder.Configurations.Add(new TenantUsernameConfiguration());
            modelBuilder.Configurations.Add(new UserConfiguration());
        }
    }

Thank you @aaron for catching our silly mistake.

We inverted the filtering by passing the owner connection id (aka the sender) to the server. Not certain the cause but intermittently it appeared that the SignalR Hub's Context.ConnectionId was wrong.

Here is our work-around

Server hub method

public void Save(string id, string payload)
{
     Clients.AllExcept(id).saved(payload);
}

client invoking method

function processIndividuals() {
     // elided
    var connectionId = $.connection.hub.id;
    abp.services.app.enrollment.save(connectionId, data).done(...)
};

server application service method

public async Task<Result<Dictionary<long, long>>> SaveAsync (string id, JObject data) {
     // elided
    var payload = JsonConvert.SerializeObject(result);
     _hub.Save(id, payload);   // invokes ISaved<string> interface implemented by SignalR hub
}

HTH

@aaron we are not calling save in multiple places. However, we believe we have a fix in place and will let you know later this afternoon if it works. Thanks.

Showing 11 to 20 of 65 entries