Base solution for your next web application
Open Closed

Cannot login with existing users after upgrade to V4.0.0 #3373


User avatar
0
fupanda created

After upgrading to V4.0.0 we cannot login with existing users anymore. We use ASP.NET 5.x and JQuery version. We don't have modifications at the abp source and only use de NuGet packages. When debugging it seems to go wrong in abp assembly. It looks like it checks on normalized credentials, is there a database migration script missing in the source?


11 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Updating ABP nuget packages does not bring migrations with them. You need to manually add a new migration for this purpose and in that migration you need to set Normalized* fields to their upper case versions.

    Thanks.

  • User Avatar
    0
    fupanda created

    Thank you for your reply.

    How do I know which fields are normalized in this version? Is there any documentation about that?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sorry, there is no documentation for that. But, when you add a new migration you will see those fields (NormalizedEmailAddress and NormalizedUserName).

    Thanks.

  • User Avatar
    0
    fupanda created

    Ok, but that means that other changes to the database are also not recognized. How do we know what database changes are made?

    I also generated a new migration but the fields NormalizedUserName and NormalizedUserName do not show up. I actually can't find them anywhere.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Since you are upgrading ABP packages, you should follow their releases. But we also implement all changes in ABP to AspNet Zero on each version change, so you can follow changes on AspNet Zero as well.

    If your migration is empty, you might already implement this to your DB. Can you check if those fields exist on your AbpUsers table or not ?

    If they exist, you must update their values with uppercase of original values.

    Thanks.

  • User Avatar
    0
    fupanda created

    We bought a AspNet Zero license. I was searching trough the sources code of ABP and zero on github and don't see the fields you mentioned on AbpUsers entity.

    I also have to mention that a migration named "Added_Tenant_UI_Customization_Properties" is delivered within de zero 4.0.0 download, which is new in this version, but I don't see a migration for the AbpUsers table. I even created a new clean database and created all tables from scratch with the downloaded package.Even then I did not find the fields mentioned.

    I also did a database compare old, new and saw no big differences.

    I still think there is something missing.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @fupanda,

    Can you send your project to us, to <a href="mailto:[email protected]">[email protected]</a> ? We will take a look at your project and fix your problem faster in that way.

    If possible it will be great if you can send your db as well. I will try to fix your problem as soon as possible after you send the project.

    Thanks.

  • User Avatar
    0
    fupanda created

    I'm sorry for my late reply. Were having difficulties sending the project by email. We have been busy trying figuring it out. In de AccountController in the web project there is a method GetLoginResultAsync. The input to the methid is correct. But however, the _logInManager.LoginAsync is always returning with no success. The loginManager is the one from Assembly Abp.Zero, Version=2.0.1.0

    private async Task<AbpLoginResult<Tenant, User>> GetLoginResultAsync(string usernameOrEmailAddress, string password, string tenancyName)
            {
                var loginResult = await _logInManager.LoginAsync(usernameOrEmailAddress, password, tenancyName);
    
                switch (loginResult.Result)
                {
                    case AbpLoginResultType.Success:
                        return loginResult;
                    default:
                        throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult.Result, usernameOrEmailAddress, tenancyName);
                }
            }
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @fupanda,

    You can upload your project to google drive and share it with us (<a href="mailto:[email protected]">[email protected]</a>). We can help you in that way.

    Thanks.

  • User Avatar
    0
    carelearning created

    We are having a similar problem. Can you post the answer to this thread so the rest of us can learn from it?

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Your problem might be related to this <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/440">https://github.com/aspnetzero/aspnet-ze ... issues/440</a>. If it is not, please share the error message in Logs.txt under your web project.

    Thanks.