I congratulate you for helping a young developer who has been struggling with this for weeks! I implemented your method in my solution and it works like a charm!!!
You saved my day, thank you a lot! I was reading a lot of documentation and no one was so clear and hands on like your video. Now it's working perfect. If you can, please create a video teaching how to create a page to manage roles, manage user roles, manage users. If you want, I'm planning to create this in the next days, so we can talk about this together. THX for all !!!
Hi! My code worked! You got me to subscribe as well! I usually struggle to find videos that help and your video really helped me out! I love the way you explain your code as well. Not information overload but straight to the point. Thank you!!
I am having trouble adding the assigning the user to Admin the line await userManager.AddToRoleAsync(user, "Admin"); comes back with foreign key error any suggestions?
For everyone else, the reason is incredibly stupid. At the stage of creating an instance of your user's class, an error occurs, most often due to the fact that you violated the password or email rules. Didn't add @, didn't add special characters, didn't add capital letters and numbers, and so on... Spend an hour on it 🤦♂@@mo3tsememam82
I'm getting an error like this, is yours the same? ` System.InvalidOperationException: The value of 'IdentityUserRole.UserId' is unknown when attempting to save changes. This is because the property is also part of a foreign key for which the principal entity in the relationship is not known.` I can't fix it, I've tried everything and I'm getting ridiculous errors
Hi.Thank you for the tutorial.Can you do part 2 where we put this into a view ?Means a page where we can see all the users and give them roles from the website. That we do not need to give the roles from the database? THANK YOU
My Program.cs looks different and i also have a Startup.cs, everything from this video needed to be added in the Startup.cs file and now my program shows an error screen saying something about a public method named "ConfigureDevelopment" or "Configure" missing from the Startup file. Can someone help me with this?
What do you think of seeding the password in clear text is that a problem? Can it get exposed e.g. in version control? How to inject the password on compilation for instance?
You could map every resource you create by that user mapped to their user ID that way each user will only get access to data They created or are given access to other users in the event it's a process flow application
Great tutorial! However I'm having a blocker when I'm assigning multiple roles to a single user, for example a user is a Company admin and at the same time an Employee and the result was the user can't access the pages with authorization at all. How can I solve this one?
🚀C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy
I congratulate you for helping a young developer who has been struggling with this for weeks! I implemented your method in my solution and it works like a charm!!!
Thanks a lot for your comment!
You saved my day, thank you a lot! I was reading a lot of documentation and no one was so clear and hands on like your video. Now it's working perfect. If you can, please create a video teaching how to create a page to manage roles, manage user roles, manage users. If you want, I'm planning to create this in the next days, so we can talk about this together. THX for all !!!
Short, compehensive and straight to the points i was looking for. Thank you!
Awesome man, I spent hours with the Microsoft tutorial and other videos. In 19 minutes you have me up and running. Thank you!
Been searching a few days for exactly this, thank you so much for posting this video!
This is one of the best tuts for ASP Core I found , thank you!
Exactly what I needed! Very Nicely Done!
Hi! My code worked! You got me to subscribe as well! I usually struggle to find videos that help and your video really helped me out! I love the way you explain your code as well. Not information overload but straight to the point. Thank you!!
Exactly what I needed, thank you so much for making this video.
Thanks for making this tutorial, great explanation. I was reading the documentation and this gives me better understanding of the implementation
Thank you so much, it worked after I attempted so many videos here on TH-cam.
Thank you for this clean expression, saved my hours
Thank you so much. This saved my whole day❤
Thank you for this turtorial. Saved me a lot of time!
I wouldn't believe that was that easy! Thanks!!!
Loved it! Exactly what I was looking for. Thank you for the great content.
I am having trouble adding the assigning the user to Admin the line
await userManager.AddToRoleAsync(user, "Admin");
comes back with foreign key error any suggestions?
did you find the solution yet?
For everyone else, the reason is incredibly stupid. At the stage of creating an instance of your user's class, an error occurs, most often due to the fact that you violated the password or email rules. Didn't add @, didn't add special characters, didn't add capital letters and numbers, and so on... Spend an hour on it 🤦♂@@mo3tsememam82
I get the same error, just now that I thought got close to solve it.
I'm getting an error like this, is yours the same? ` System.InvalidOperationException: The value of 'IdentityUserRole.UserId' is unknown when attempting to save changes. This is because the property is also part of a foreign key for which the principal entity in the relationship is not known.` I can't fix it, I've tried everything and I'm getting ridiculous errors
Thank you soooooooo much, You saved me hours of worries.
Thank you very much! Very good explanation. Everything works. Cool!
This is Gold 👌
Hi.Thank you for the tutorial.Can you do part 2 where we put this into a view ?Means a page where we can see all the users and give them roles from the website. That we do not need to give the roles from the database? THANK YOU
yes this! When they create an account how do we add it so they can pick!
My Program.cs looks different and i also have a Startup.cs, everything from this video needed to be added in the Startup.cs file and now my program shows an error screen saying something about a public method named "ConfigureDevelopment" or "Configure" missing from the Startup file. Can someone help me with this?
Thank you very much! Great tutorial :D
What do you think of seeding the password in clear text is that a problem? Can it get exposed e.g. in version control? How to inject the password on compilation for instance?
I highly recommend this tutorial
Great Video, do you have video on how to create a multi-step form that creates new user and add their role to the database?
Thanks!
I am facing an error because my login functionality does not working. Any suggestions ?
when i am trying to log in with the hard coded data , its not allowing me to log in
can you kindly tell me how to prevent 2 registered user with same role to not access each other data in Asp ,net core??
You could map every resource you create by that user mapped to their user ID that way each user will only get access to data They created or are given access to other users in the event it's a process flow application
How can i customize the "Acces Denied" Page?
thank you this was great
Great, thank you
Great job
Thank you for this, great information. Could this similarly be accomplished by adding a row to the existing aspnetusers tabled called "roles"?
wish every tutorial was like this
Wouldn't it be fine using inly one scope instead of two?
Good, informative way. One of tasks for hire is to create CRUD API with User Role authorization. Does Identity work with multiple roles for one user?
thank you very much!
Very very thank youuu
man, i love it
It was amazing
Perfect!
thank you man
Make a small project tutorial like Doctor appointment with CRUD operations or any other small project
As Web API or using the standard MVC template?
@@tutorialsEUC probably mvc!
@@krxthx 100% need it for mvc
Great tutorial! However I'm having a blocker when I'm assigning multiple roles to a single user, for example a user is a Company admin and at the same time an Employee and the result was the user can't access the pages with authorization at all. How can I solve this one?
No need to assign the role 'employee' to an admin. Inherently everyone in the company is an employee.
usefull 🤩
can i have source code please i cannot see the full code in video that's why source code needed
Good tutorial, only do this once in a blue moon and forget how to do it everytime!
AddDefaultIdentity methods doesn't exist
Question is how do you people know all this stuff, wat's the secret?