Skip to main content

All Questions

-1 votes
0 answers
31 views

Who manages logins the API or the front end web app [duplicate]

I'm working in a team where I'm developing an ASP.NET Core 8.0 Web API for a multi tenant application that returns results from a SQL Server database, and someone else is developing a web portal that ...
Shmiel's user avatar
  • 1,251
0 votes
1 answer
43 views

How can I configure asp net core authorization to find the user's roles from my custom DB schema?

I've got SQL Server tables Users, Roles and SecurityGroups, each containing an integer ID and a NVARCHAR Name. I also have mapping tables User_SecurityGroup and SecurityGroup_Role. A user can be in ...
Legion's user avatar
  • 3,378
0 votes
0 answers
35 views

Extending ApplicationUser on a fresh Blazor Server-only project with Individual accounts

I'm trying to extend ApplicationUser with custom properties on a fresh Blazor server project. Here's what I have: public class Tariff { public int Id { get; set; } public required string Name {...
SelfishCrawler's user avatar
0 votes
0 answers
38 views

Blazor frontend with Authentication enabled bombs when a password change is executed

I am developing a web app that contains a Blazor front end and a .net WebAPI backend. Both are developed using the .NET 8 version. I also have a class library project where I have all the data ...
Babu Mannavalappil's user avatar
0 votes
0 answers
41 views

How to remove PasswordHash Autogeneration when seeding Identity NET CORE

I'm seeding the User identity table using EF core configurations, this is my method. public void Configure(EntityTypeBuilder<IdentityUser> builder) { var hasher = new PasswordHasher<...
Sgri's user avatar
  • 3
1 vote
0 answers
49 views

The seed entity for entity type 'IdentityUser' cannot be added because no value was provided for the required property 'Id' when seeding default users

I'm trying to seed 2 default users (admin & standard user) using data migrations and I'm getting an error with the Id property of the IdentityUser entity. This is the code I'm using: internal ...
misuk's user avatar
  • 205
0 votes
1 answer
41 views

EF Core 8 Identity - Issue with SignInManager / _loginPartial

In my EF Core 8 web app with Identity, my login partial is not working (anymore). The Identity pages are not loading, nor seem even the corresponding controller actions to be triggered. I can ...
random's user avatar
  • 11
0 votes
0 answers
37 views

Property "UserRoles" of custom IdentityUser is always empty

I needed to check if the company had at least one owner, so I wrote the following code: var company = await _uow.CompanyRepository.GetCompaniesIncludedUsersByIdAsync(command.CompanyId); if (company is ...
Dmytro Kotenko's user avatar
0 votes
1 answer
56 views

How can a Foreign Key refer to a property on an Entity Splitting child table?

I am creating a new IdentityDbContext based on an existing customized database. Instead of adding custom properties to AspNetUsers, it was decided years ago to add them to another table, CustomUser, ...
Rich Bennema's user avatar
  • 10.3k
0 votes
1 answer
64 views

EF Core generate b-tree but not a btree in postgres

EF Core 8.0.1 generate b-tree SQL code for Postgres. When I'm trying to apply migration on a server, it produces a Postgres error 2024-02-12T23:41:35.418441849Z 12.02.2024 23:41:35.418+00:00 [ERR] (1) ...
Alex's user avatar
  • 29
0 votes
1 answer
77 views

Trailing Whitespaces Appended to Fixed-Length Property in Entity Framework Core

I'm facing an issue in my .NET 8 application where trailing whitespaces are being appended to a fixed-length property (UserName) when stored in the database. I am using Database provider - Microsoft....
skyhunter96's user avatar
2 votes
0 answers
66 views

How to STOP the ASP.NET Identity API from creating a DbContext on every request when using services.AddDefaultIdentity()?

I am using the ASP.NET Identity API in ASP.NET 8, using the following code in Program.cs: var services = builder.Services; services.AddDbContext<MyDbContext>(); services.AddDefaultIdentity<...
xblz's user avatar
  • 41
0 votes
0 answers
52 views

OnConfiguring event of the Identity Context class does not fire when writing a record to the AspNetUsers table

I'm using Identity in Asp.net core and my context inherits from a NetDevPackAppDbContext class which is a very cool assembly created by Eduardo Pires. I'm overriding the "OnConfiguring" ...
masterj's user avatar
  • 55
0 votes
0 answers
46 views

How to change foreign key in Entity Framework Core identity models?

The User Model public class User : IdentityUser { public string Code { get; set; } = null!; public virtual ICollection<UserClaim> Claims { get; set; } } UserClaim Model public ...
Suraj Khanal's user avatar
0 votes
0 answers
67 views

What is wrong with my one-to-one EF Core relationship setup?

I am attempting to convert an Optimizely CMS ASP.NET application from .NET 4.x to .NET 7. I have two related EF Core entities: public class ScholarshipApplication { public virtual AppUser User { ...
Brian Chambers's user avatar

15 30 50 per page
1
2 3 4 5
22