ASP.NET User Roles - Create and Assign Roles for AUTHORIZATION!

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025

Комментарии •

  • @tutorialsEUC
    @tutorialsEUC  Год назад +1

    🚀C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy

  • @clems5204
    @clems5204 Год назад +9

    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!!!

  • @ViniciusBilieri
    @ViniciusBilieri Год назад +7

    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 !!!

  • @sandrakyoutube
    @sandrakyoutube Год назад +11

    Short, compehensive and straight to the points i was looking for. Thank you!

  • @willdavis2964
    @willdavis2964 Год назад +5

    Awesome man, I spent hours with the Microsoft tutorial and other videos. In 19 minutes you have me up and running. Thank you!

  • @sharonroy9877
    @sharonroy9877 Год назад

    Been searching a few days for exactly this, thank you so much for posting this video!

  • @AndyBochmann-y6c
    @AndyBochmann-y6c 3 месяца назад

    Exactly what I needed, thank you so much for making this video.

  • @courtneycole4993
    @courtneycole4993 2 месяца назад

    Exactly what I needed! Very Nicely Done!

  • @TheMoviesManX
    @TheMoviesManX Год назад +1

    This is one of the best tuts for ASP Core I found , thank you!

  • @HELLF1RE
    @HELLF1RE 8 месяцев назад

    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!!

  • @ordinaryBrownDad
    @ordinaryBrownDad 11 месяцев назад

    Thanks for making this tutorial, great explanation. I was reading the documentation and this gives me better understanding of the implementation

  • @buwo_
    @buwo_ 10 месяцев назад

    Thank you for this clean expression, saved my hours

  • @sibabalonjisane8520
    @sibabalonjisane8520 Год назад

    Thank you so much, it worked after I attempted so many videos here on RUclips.

  • @HuskyRiderTR
    @HuskyRiderTR Год назад

    I wouldn't believe that was that easy! Thanks!!!

  • @utens_g
    @utens_g 6 месяцев назад

    Thank you so much. This saved my whole day❤

  • @KonstantinBykov-o3k
    @KonstantinBykov-o3k 9 месяцев назад

    Thank you very much! Very good explanation. Everything works. Cool!

  • @kingsley3194
    @kingsley3194 Год назад

    Thank you soooooooo much, You saved me hours of worries.

  • @Laffendo
    @Laffendo Год назад

    Thank you for this turtorial. Saved me a lot of time!

  • @thedanielspindler
    @thedanielspindler Год назад

    Loved it! Exactly what I was looking for. Thank you for the great content.

  • @ryuksae
    @ryuksae Месяц назад

    Thanks!

  • @Josiahtkd
    @Josiahtkd Год назад +4

    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?

    • @mo3tsememam82
      @mo3tsememam82 Год назад +2

      did you find the solution yet?

    • @scydevcode
      @scydevcode Год назад

      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

    • @lukask028
      @lukask028 10 месяцев назад

      I get the same error, just now that I thought got close to solve it.

    • @Emre-qp6fk
      @Emre-qp6fk 9 месяцев назад

      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

  • @new_direction_net
    @new_direction_net Год назад

    This is Gold 👌

  • @favourolanipekun4297
    @favourolanipekun4297 Год назад

    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?

  • @carnajx6570
    @carnajx6570 Год назад +2

    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

    • @emilyalbert3366
      @emilyalbert3366 Год назад

      yes this! When they create an account how do we add it so they can pick!

  • @TENBALZ
    @TENBALZ Год назад

    wish every tutorial was like this

  • @xeebodog
    @xeebodog Год назад

    Thank you for this, great information. Could this similarly be accomplished by adding a row to the existing aspnetusers tabled called "roles"?

  • @johnkrator
    @johnkrator Год назад

    I highly recommend this tutorial

  • @paulsotelo4010
    @paulsotelo4010 5 месяцев назад

    Great, thank you

  • @ahmedqasem7651
    @ahmedqasem7651 Год назад

    Great job

  • @feketeadrian9789
    @feketeadrian9789 Год назад

    Thank you very much! Great tutorial :D

  • @ГеоргийСлавин-р8п

    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?

  • @AdrenalSnakeREX
    @AdrenalSnakeREX Год назад

    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?

  • @muhammadubaid3800
    @muhammadubaid3800 Год назад +1

    I am facing an error because my login functionality does not working. Any suggestions ?

  • @steenstiller
    @steenstiller Год назад

    How can i customize the "Acces Denied" Page?

  • @honeylemonteayum
    @honeylemonteayum 10 месяцев назад

    thank you this was great

  • @mohammad6924
    @mohammad6924 8 месяцев назад

    Very very thank youuu

  • @estebansaavedra3128
    @estebansaavedra3128 Год назад

    thank you very much!

  • @dopplermonk
    @dopplermonk Год назад

    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?

  • @devmarwat
    @devmarwat Год назад

    It was amazing

  • @abdullahalsubei
    @abdullahalsubei Год назад

    man, i love it

  • @alisadiyathool
    @alisadiyathool 8 месяцев назад

    when i am trying to log in with the hard coded data , its not allowing me to log in

  • @sawairasana
    @sawairasana Год назад +3

    can you kindly tell me how to prevent 2 registered user with same role to not access each other data in Asp ,net core??

    • @BBtechnology
      @BBtechnology 5 месяцев назад

      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

  • @danhedaiat
    @danhedaiat Год назад

    thank you man

  • @cricomedy7896
    @cricomedy7896 Год назад +2

    Make a small project tutorial like Doctor appointment with CRUD operations or any other small project

    • @tutorialsEUC
      @tutorialsEUC  Год назад +1

      As Web API or using the standard MVC template?

    • @krxthx
      @krxthx Год назад

      ​@@tutorialsEUC probably mvc!

    • @kiolinharisanker8165
      @kiolinharisanker8165 Год назад +2

      @@krxthx 100% need it for mvc

  • @Holsp
    @Holsp Год назад

    Wouldn't it be fine using inly one scope instead of two?

  • @EminHasanov-nj6un
    @EminHasanov-nj6un Год назад +1

    Perfect!

  • @user-oh7to8xw3j
    @user-oh7to8xw3j Год назад

    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?

    • @davidkuseh1097
      @davidkuseh1097 7 месяцев назад +1

      No need to assign the role 'employee' to an admin. Inherently everyone in the company is an employee.

  • @jessor33
    @jessor33 Год назад

    usefull 🤩

  • @mndilove818
    @mndilove818 Год назад

    can i have source code please i cannot see the full code in video that's why source code needed

  • @oranasoftware
    @oranasoftware Год назад

    Good tutorial, only do this once in a blue moon and forget how to do it everytime!

  • @peymannaji
    @peymannaji 9 месяцев назад +1

    AddDefaultIdentity methods doesn't exist

  • @BBtechnology
    @BBtechnology 5 месяцев назад

    Question is how do you people know all this stuff, wat's the secret?