Questions tagged [usermanager]

122 questions
0
votes
0 answers

Having trouble with identity users in asp.net core 3 web application, receiving 'invalid object name Aspnetusers' error

Good Day. I am suffering a problem with asp.net identity. I am getting error at this line: var user = await _userManager.FindByEmailAsync(Input.Email); the error is : (Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name…
0
votes
0 answers

Irregular error "The specified cast is not valid" at UserManager.FindByNameAsync(model.Email)

I am using the code: ApplicationUser user = await UserManager.FindByNameAsync(model.Email); to authenticate user on login in ASP.NET MVC application. Framework 4.7.2. I am getting an error: The specified cast from a materialized 'System.String' type…
0
votes
0 answers

Why dont work UserManager asp net core 6?

I have a trouble. My login method always returns false public async Task Login(UserLoginForm user) { if (user.nick.Replace(" ", "") != "") { if (user.password.Replace(" ", "") != "") { …
0
votes
1 answer

Problem with Identity UserManager error on password hashing

when I use this code: var passwordHasher = new PasswordHasher(); string hashedPassword = passwordHasher.HashPassword(pp.Password); User newUser = new User() { UserName =…
0
votes
1 answer

Android: Check if Current User is a guest

I had a read through UserManager and UserHandle docs and couldn't find any method which would return a boolean answering the question. Anyone have an idea how to determine this?
user3826764
  • 198
  • 1
  • 9
0
votes
1 answer

Change Userpassword (ASP.Identity) with localstorage based JWT-Token in ASP.NET Core

Good day, i´m a very beginning C# developer and trying to do my first steps with ASP.NET Core. For now i´m at a point where i need some external help. I developed a Blazor based website and added some users to my database. Now i would like to add a…
0
votes
1 answer

How do I update a custom property of an IdentityUser through api controller in ASP.NET Core?

So I'm working on an api controller and I have an update method like this: [HttpPost("update")] public async Task Update([FromBody] UpdateModel model) { if (!ModelState.IsValid) { …
JeeferSan
  • 21
  • 6
0
votes
1 answer

How can we handle more than one user usage for identity core usermanagement and userstore without customization with generic type?

We have a multitenant architecture with more than one user like below with identity core library: public class ApplicationUser : IdentityUser { } public class Tenant1User: ApplicationUser { public int deneme { get; set; } } public class…
0
votes
1 answer

ASP.Net Core Identity - Manage other users

I have customized the default user identity and created several users. assuming that i am the admin and i want to manage other users information (Change property values). how can i get access to other users data if i have their IDs. i can retrieve…
Ayman
  • 11
  • 1
0
votes
1 answer

userManager.GetRolesAsync() returns list of roles but userManager.GetUsersInRoleAsync() returns empty list

Problem The below code fetches the roles of users but not the users in that particular role. Is there something missing? Code public void SeedRolesData(PartnerDbContext context) { if (!context.Roles.Any()) { …
0
votes
1 answer

How to fix "The specified type member 'UserId' is not supported in LINQ to Entities" in ApplicationUserManager

I'm currently working on an older MVC 5 website that originally was using a code-first generated database with Entity Framework. It has since been converted to db-first, refactored, and I'm now in the process of removing the old entity c# files and…
McCrockett
  • 159
  • 1
  • 9
0
votes
1 answer

Is there any built-in manager for handling CRUD operations of tables from ConfigurationDbContext(Clients, Resources...)?

I'm very new with those things, so I have some problems with understanding and figuring out which approach to use. Currently, I am using .NET Core 3.1 and IdentityServer4 in my project. I am configuring my authorization server and there I have some…
0
votes
1 answer

Oracle DB record accessible once only using NetFrameworkCore for Oracle

I have a simple web solution (incomplete) using NetFrameworkCore for Oracle. See HomeController.CS & AspNetUser.CS --> The issue is I have an AspNetUser record that was created in DB via Microsoft.AspNetCore.Identity.UserManager. This record is…
0
votes
0 answers

In .Net Core 2.2 please how can I use a custom UserStore with the default .Net UserManager or must I build a UserManager from scratch?

I have built an identity system by scaffolding my entities into database (Code-First), built an EmployeeStore that inherits from IUserStore, however, whenever my OnPost method tries to use the NormalizedUserName method in EmployeeStore, I always get…
juwonlona
  • 1
  • 1
  • 3
0
votes
1 answer

How Can I Get All Users with one Role by UserManager in Mvc Core3?

How can I get all users with one role by UserManager in Mvc Core 3? I want UserName, UserId and roles. This is my sample code but it's not working: var users = userManager.Users.Take(50).ToList(); var Getesroles = new List>(); foreach…
1 2 3
8 9