Last post Sep 07, 2020 09:39 AM by PatriceSc
Sep 04, 2020 05:07 PM|tinac99|LINK
I had to upgrade Oracle version from 12c to 19c. I am using ASP.Net Core 2.2.
I was able to retrieve my user-defined tables. However, I am unable to retrieve the Identity tables.
In this code, user returns null:
var user =
My initial database used to create(using scaffolding) is not the same database name/server used in the new upgrade server.
public partial class ToolsDbContext : IdentityDbContext<AppUser>
public ToolsDbContext(DbContextOptions<ToolsDbContext> options)
protected override void OnModelCreating(ModelBuilder modelBuilder)
I suppose I can add the Identity tables in ToolsDBContext but that seems to be the wrong approach. I thought the "base.OnModelCreating(modelBuilder); " will resolve it, but unfortunately, did not.
Sep 07, 2020 08:48 AM|YihuiSun|LINK
Sep 07, 2020 09:39 AM|PatriceSc|LINK
A bit unclear. I would double check if I'm reading from the expected db and if I see this name in the corresponding tables. Then it seems you are talking about not having identity tables but then I would expect another kind of error.
For now I suspect you really don't have this user in an existing table.
Not directly related but ToUpper should be useless. Edit: it uses
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.ilookupnormalizer?view=aspnetcore-3.1 to allow emails and names normalization.
Anyway I would start by looking at which db and which data I have to make sure ASP.NET Identity is really supposed to find the user I'm trying to find.