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

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

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

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

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

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

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

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

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

  • @courtneycole4993
    @courtneycole4993 13 дней назад

    Exactly what I needed! Very Nicely Done!

  • @AndyBochmann-y6c
    @AndyBochmann-y6c 22 дня назад

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

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

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

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

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

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

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

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

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

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

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

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

    Thank you for this clean expression, saved my hours

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

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

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

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

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

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

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

    Thank you so much. This saved my whole day❤

  • @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 10 месяцев назад

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

  • @kingsley3194
    @kingsley3194 9 месяцев назад

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

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

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

  • @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 8 месяцев назад

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

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

      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

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

    wish every tutorial was like this

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

    I highly recommend this tutorial

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

    Thank you very much! Great tutorial :D

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

    Great, thank you

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

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

  • @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

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

    This is Gold 👌

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

    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?

  • @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 2 месяца назад

      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

  • @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?

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

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

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

    Great job

  • @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?

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

    thank you this was great

  • @ГеоргийСлавин-р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?

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

    Very very thank youuu

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

    thank you very much!

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

    How can i customize the "Acces Denied" Page?

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

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

  • @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 5 месяцев назад +1

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

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

    It was amazing

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

    thank you man

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

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

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

    man, i love it

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

    thank you bro

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

    Perfect!

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

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

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

    usefull 🤩

  • @mndilove818
    @mndilove818 9 месяцев назад

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

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

    AddDefaultIdentity methods doesn't exist

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

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

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

    This seems verbose, wouldn't it be easier to add the roles from your application DB context?

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

      I was thinking the exact same.

    • @doommortein7687
      @doommortein7687 7 месяцев назад

      Please do a video