Exception in GetConfirmationToken when using Guid for Id

Jan 5, 2014 at 4:59 PM
Edited Jan 5, 2014 at 5:44 PM
In the GetConfirmationTokenAsync and GetPasswordResetTokenAsync method in the UserManager<TUser, TKey> class, if your TKey is a Guid, an exception will be thrown of:
An unhandled exception of type 'System.InvalidCastException' occurred in mscorlib.dll

Additional information: Object must implement IConvertible.
I tracked the error to this piece of code when tryint to convert guid to string using this method:
UserId = (string) Convert.ChangeType((object) userId, typeof (string))
I'm not sure if you guys fixed this already, just posting it here.
Developer
Jan 30, 2014 at 12:55 AM
@Mixmasterxp: Can you verify if you can repro this issue with the latest packages from http://myget.org/f/aspnetwebstacknightly . I took a look and this seems to work fine for Tkey being Guid