Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lander Debeuf 23 posts 125 karma points
    Apr 29, 2019 @ 13:36
    Lander Debeuf
    0

    UmbracoIdentity throws error after installing

    A clean project was created and a fresh install of the UmbracoCms v 12.4.0 and UmbracoIdentity v6.1.0 was done.

    This project doesn't compile anymore. In the UmbracoIdentityAccountController there seems to be an issue with the User.Identity.GetUserId

    Microsoft.AspNet.Identity.IdentityExtensions.GetUserId<T> 
    

    and the

    UmbracoIdentity.IdentityExtensions.GetUserId<T>
    

    Also a reference is missing in that file to using UmbracoIdentity;

    I don't know why that isn't tackled in the package before installing it but it could save a lot of headakes.

    So after changing all the lines that were giving me an error from

    User.Identity.GetUserId<int>()
    

    to this

    UmbracoIdentity.IdentityExtensions.GetUserId<int>(User.Identity)
    

    the project compiles, But it is still not running as it should. (where a few weeks back it did work like this)

    i now have 2 problems.

    Registering a new user is working fine, but the user is not getting logged in. The page just refreshes, no error, nothing, but still not logged in. When i use a wrong password it says

    Invalid username or password

    So it is semi working but for some reason it is not allowing me to log in.

    If i enable the external login provider (cfr Facebook) i need to enable SSL at that point i get an error thrown when i just start the login page (i am not even trying to connect with facebook. i just enabled SSL for my solution

    Could not convert the id ad8257d5-132d-422a-a772-3717f782d498 to type System.Int32
    
    
    [InvalidOperationException: Could not convert the id ad8257d5-132d-422a-a772-3717f782d498 to type System.Int32]
       UmbracoIdentity.IdentityExtensions.GetUserId(IIdentity identity) in C:\projects\umbracoidentity-j2659\src\UmbracoIdentity\IdentityExtensions.cs:18
       Microsoft.AspNet.Identity.Owin.<<OnValidateIdentity>b__1>d__4.MoveNext() +586
    

    I have no idea where this is popping up all of a sudden. I used to work with this without any problem untill today...

  • nickornotto 402 posts 905 karma points
    Nov 11, 2020 @ 18:46
    nickornotto
    0

    Hi, Did you resolve it?

Please Sign in or register to post replies

Write your reply to:

Draft