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

Activities of "bertusvanzyl"

When typing in wrong username/password, the message is displayed informing the user that username/password combo was wrong. The loading spinner does not disapear.

I have tracked down the cause. When updating all the Abp nuget packages to 3.2.4, the following file was updated:

abp.sweet-alert.js.

Old code:

return $.Deferred(function ($dfd) {
            sweetAlert(opts, function () {
                $dfd.resolve();
            });
        });

New Code:

return $.Deferred(function ($dfd) {
            sweetAlert(opts).then(function () {
                $dfd.resolve();
            });
        });

The problem is that sweetAlert() does not return a promise.

Reverting the code back to the old code from pre 3.2.4 solves the problem, but I think that simply updating all the nuget packages should not result in this happening.

I am still getting these exceptions after all. So what do you guys need to trouble shoot this further?

Ok no problem. You guys might want to adjust the documentation here (<a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Timing">https://aspnetboilerplate.com/Pages/Documents/Timing</a>) a bit, it contains the following:

ABP automatically normalized DateTimes received from database based on the current clock provider, when EntityFramework or NHibernate modules used.

I am using angular 1, with MVC backend.

When I send a datetime from the frontend through an AppService, it gets converted to UTC. But when I get a datetime value from a repository, it is not converted back to local time, even though I have the time zone set correctly in the settings.

According to this doc here: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Timing">https://aspnetboilerplate.com/Pages/Documents/Timing</a> It should convert when reding from the database as well.

Is there something I am required to set up in Zero for this to work properly?

It doesnt look like it... The exception is: System.OverflowException: Arithmetic operation resulted in an overflow.

either way, I havent seen it in a while. If it comes back I will just post here again.

I could do that, but then we will never know why this error is happeneing.

I will share the whole file:

using System.Data.Common;
using System.Data.Entity;
using Abp.Zero.EntityFramework;
using PCM.Authorization.Roles;
using PCM.Authorization.Users;
using PCM.Chat;
using PCM.Friendships;
using PCM.Models.Parties;
using PCM.Models.Policy;
using PCM.Models.PolicyDefinition;
using PCM.Models.Sequence;
using PCM.MultiTenancy;
using PCM.Storage;
using static PCM.Models.Enums.Enums;

namespace PCM.EntityFramework
{
    /* Constructors of this DbContext is important and each one has it's own use case.
     * - Default constructor is used by EF tooling on design time.
     * - constructor(nameOrConnectionString) is used by ABP on runtime.
     * - constructor(existingConnection) is used by unit tests.
     * - constructor(existingConnection,contextOwnsConnection) can be used by ABP if DbContextEfTransactionStrategy is used.
     * See http://www.aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration for more.
     */

    public class PCMDbContext : AbpZeroDbContext<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<PolicyDefinition> PolicyDefinitions { get; set; }

        public virtual IDbSet<ClonedPolicyDefinition> ClonedPolicyDefinitions { get; set; }

        public virtual IDbSet<Party> Parties { get; set; }

        public virtual IDbSet<Policy> Policies { get; set; }

        public virtual IDbSet<PolicyPartyRelationship> PolicyPartyRelationships { get; set; }

        public virtual IDbSet<PartyProperty> PartyProperties { get; set; }

        //enums
        public virtual IDbSet<TimeSpan> PolicyDefinitionTimeSpans { get; set; }

        //sequence
        public virtual IDbSet<SequencePosition> Sequences { get; set; }

        public virtual IDbSet<Gender> Gender { get; set; }

        public PCMDbContext()
            : base("Default")
        {
            
        }

        //protected override void OnModelCreating(DbModelBuilder modelBuilder)
        //{
        //    //modelBuilder.Entity<ClonedPolicyDefinition>().Map(m =>
        //    //{
        //    //    m.MapInheritedProperties();
        //    //    m.ToTable("ClonedPolicyDefinitions");
        //    //});
        //}

        public PCMDbContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        {

        }

        public PCMDbContext(DbConnection existingConnection)
           : base(existingConnection, false)
        {

        }

        public PCMDbContext(DbConnection existingConnection, bool contextOwnsConnection)
            : base(existingConnection, contextOwnsConnection)
        {

        }
    }
}

After a while, I start getting those exceptions again, even with latest nuget packages. The site seems to be working, but whatever is happening on these timer intervals surely has a purpose, and it is breaking currently. Also, the logs are being poluted by these exceptions. Please advise.

EDIT: Exception is still there with latest nuget packages.

I think I solved this myself. I simply updated all nuget packages that were out of date, and I am no longer getting this error. I will keep an eye on it.

Showing 21 to 30 of 34 entries