locked
Owin PasswordHash Column data type change RRS feed

  • Question

  • Hi,

    I am implementing Open Authentication  in existing project. This project uses SQL database where password field as Varbinary [byte[] in c#]. Owin doesn't allows to save password in byte array. It internally uses string. When i am changing it to NVarchar, it works but when I change it to Varbinary it gives exception. 

    Schema specified is not valid. Errors: 

    (26,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.String[Nullable=True,DefaultValue=,MaxLength=Max,Unicode=True,FixedLength=False]' of member 'PasswordHash' in type 

    Code used for conversion of data type is

    modelBuilder.Entity<ApplicationUser>().Property(x => x.PasswordHash).HasColumnType("nvarchar"); its working but when I use 

    modelBuilder.Entity<ApplicationUser>().Property(x => x.PasswordHash).HasColumnType("Varbinary"); Doesn't works

    Thanks

    Tuesday, January 31, 2017 11:31 AM

Answers

  • I'd try them over here.

    https://forums.asp.net/25.aspx/1?Security

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Tuesday, January 31, 2017 1:48 PM