0

I'm testing the new asp.net identity. I added a new table to the SQL database to gather more information about each subscriber (name, family name, city etc). I don't want to use the existing ASpNetUsers for that matter. I want to use 2 different tables. To identify the same subscriber in the 2 tables I'm using the Unique Identifier that is added automatically to the ASpNetUsers table. Couple of days ago I noticed that one of the ID in the ASpNetUsers has changed. Dunno how. Is that possible? Can the ID of a registered subscriber change in the ASpNetUsers table for any reason (changing password, confirming a new password etc?

Thanks

Gloria
  • 1,305
  • 5
  • 22
  • 57
  • What is the name and type of the ID field you're using? – Dai Jul 24 '14 at 07:21
  • [Id] NVARCHAR (128) NOT NULL, CONSTRAINT [PK_dbo.AspNetUsers] PRIMARY KEY CLUSTERED ([Id] ASC) – Gloria Jul 24 '14 at 08:27
  • This is an example of the id in the database: b45jh3b9-343a-5dd6-a92s-84521bc9321ef – Gloria Jul 24 '14 at 08:29
  • That looks like a GUID. Why not use the `Guid` type in SQL Server instead of `nvarchar`? You don't need 256 bytes for each ID that way, thus saving a lot of space. – Dai Jul 24 '14 at 08:40
  • The AspNetUsers table was added automatically when I installed the identity package. The Id column was also added automatically. I didn't configure them myself. I'm afraid to change any type in the database. The built-in package system might stop working. What do you think? – Gloria Jul 24 '14 at 08:58
  • The ID should stay the same. When you change the password then the SecurityStamp changes. – pranav rastogi Jul 25 '14 at 00:06

0 Answers0