I started testing ASP.NET Core 3.0 and I am having trouble authenticating users. This is what I did:
- I replaced my current version of dotConnect for PostgreSQL from 7.13.14.37 to 7.15.1519
- I created a project with Visual Studio 2019 v16.3.9 and selected ".NET Core 3.0" and "Individual User Account" authentication.
- I followed instructions in DevArt documentation "Using Entity Framework Core Implementation of ASP.NET Core Identity for PostgreSQL" (https://www.devart.com/dotconnect/postg ... frame.html)
- I ran the web project.
- I tried to login with user accounts that were already registered with an ASP.NET Core 2.2 project. I get an "Invalid login attempt" message.
- I added a new user and tried to login and I also get an "Invalid login attempt" message.
- I confirmed that user in previous step was added to the DB.
The result of the Packet Manager Console commands is as follows:
PM> install-package Devart.Data.PostgreSql.EFCore -Source:"https://www.nuget.org/api/v2/"
The 'Source' parameter is not respected for the transitive package management based project(s) riopoderoso.info30. The enabled sources in your NuGet configuration will be used.
Restoring packages for C:\Visual Studio 2019 Projects\riopoderoso.info30\riopoderoso.info30\riopoderoso.info30.csproj...
Installing NuGet package Devart.Data.PostgreSql.EFCore 7.15.1519.
Committing restore...
Writing assets file to disk. Path: C:\Visual Studio 2019 Projects\riopoderoso.info30\riopoderoso.info30\obj\project.assets.json
Restore completed in 136.49 ms for C:\Visual Studio 2019 Projects\riopoderoso.info30\riopoderoso.info30\riopoderoso.info30.csproj.
Successfully installed 'Devart.Data 5.0.2311' to riopoderoso.info30
Successfully installed 'Devart.Data.PostgreSql 7.15.1519' to riopoderoso.info30
Successfully installed 'Devart.Data.PostgreSql.EFCore 7.15.1519' to riopoderoso.info30
Executing nuget actions took 2.83 sec
Time Elapsed: 00:00:03.9267655
PM> update-database
Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 3.0.0 initialized 'ApplicationDbContext' using provider 'Devart.Data.PostgreSql.Entity.EFCore' with options: None
Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30']
select count(*)
from information_schema.tables
where (table_schema = current_schema() AND table_name = '__EFMigrationsHistory')
Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30']
select count(*)
from information_schema.tables
where (table_schema = current_schema() AND table_name = '__EFMigrationsHistory')
Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30']
select count(*)
from information_schema.tables
where (table_schema = current_schema() AND table_name = '__EFMigrationsHistory')
Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30']
select count(*)
from information_schema.tables
where (table_schema = current_schema() AND table_name = '__EFMigrationsHistory')
Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
Microsoft.EntityFrameworkCore.Migrations[20405]
No migrations were applied. The database is already up to date.
No migrations were applied. The database is already up to date.
Done.
I am using PostgreSQL version 11.
I will very much appreciate your feedback.
Best regards.