Тёмный

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

tutorialsEU - C#
Подписаться 21 тыс.
Просмотров 67 тыс.
50% 1

🔥 Want to know how to give your ASP.NET App Users Roles? This is the video!
🚀 C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp...
We'll make sure to turn you into a true developer in no time!
Timestamps:
00:00 Introduction
00:25 What are we going to make?
01:44 Add the roles
03:04 This one is for you!
03:30 preparing our application to handle user roles
18:50 Testing the final app
19:00 Thanks for watching!
ASP.NET User Roles - Create and Assign Roles for AUTHORIZATION!
So, what is C#?
C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programming language. C# enables developers to build many types of secure and robust applications that run in .NET. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers. This tour provides an overview of the major components of the language in C# 8 and earlier. If you want to explore the language through interactive examples, try the introduction to C# tutorials.
C# is an object-oriented, component-oriented programming language. C# provides language constructs to directly support these concepts, making C# a natural language in which to create and use software components. Since its origin, C# has added features to support new workloads and emerging software design practices. At its core, C# is an object-oriented language. You define types and their behavior.
And what is ASP.NET?
ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Active Server Pages Network Enabled Technologies.
And what is Identity?
Is an API that supports user interface (UI) login functionality.
Manages users, passwords, profile data, roles, claims, tokens, email confirmation, and more.
Users can create an account with the login information stored in Identity or they can use an external login provider. Supported external login providers include Facebook, Google, Microsoft Account, and Twitter.
The Identity source code is available on GitHub. Scaffold Identity and view the generated files to review the template interaction with Identity.
Identity is typically configured using a SQL Server database to store user names, passwords, and profile data. Alternatively, another persistent store can be used, for example, Azure Table Storage.
To learn more, make sure to watch the video, and we promise you that you'll become a better developer by the end of the video! Have fun!
And thank you LAKEY INSPIRED for these amazing songs that we use in all our videos! @LAKEYINSPIRED
#csharp #coding #tutorial #learn #microsoft #net #register #roles #authentication
TAGS
c#,.net,c-sharp,csharp,programming,visual studio,c sharp,learn c#,c# programming,c# tutorial,c# for beginners,learn c# programming,c# course,tutorial,coding,registration,authentication,authorization,.net core,asp.net core,asp.net mvc framework,asp.net mvc,asp.net,core,mvc,entity framework,dotnet,roles,asp.net core tutorial,asp.net core mvc,asp.net core identity,role based authorization in asp.net core,asp.net identity,razor pages,users,asp user roles
TutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Stay tuned and subscribe to tutorialsEU: goo.gl/rBFh3x
C#: / @tutorialseuc
Facebook: / tutorialseu-1093802040...
LinkedIn: / tutorialseu
Discord: / discord

Опубликовано:

 

6 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 61   
@tutorialsEUC
@tutorialsEUC 10 месяцев назад
🚀C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy
@sandrakyoutube
@sandrakyoutube Год назад
Short, compehensive and straight to the points i was looking for. Thank you!
@ViniciusBilieri
@ViniciusBilieri 11 месяцев назад
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 !!!
@willdavis2964
@willdavis2964 10 месяцев назад
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 5 месяцев назад
Been searching a few days for exactly this, thank you so much for posting this video!
@thedanielspindler
@thedanielspindler Год назад
Loved it! Exactly what I was looking for. Thank you for the great content.
@clems5204
@clems5204 Год назад
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!!!
@tutorialsEUC
@tutorialsEUC Год назад
Thanks a lot for your comment!
@sibabalonjisane8520
@sibabalonjisane8520 Год назад
Thank you so much, it worked after I attempted so many videos here on RU-vid.
@TheMoviesManX
@TheMoviesManX 9 месяцев назад
This is one of the best tuts for ASP Core I found , thank you!
@Laffendo
@Laffendo Год назад
Thank you for this turtorial. Saved me a lot of time!
@HELLF1RE
@HELLF1RE Месяц назад
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!!
@feketeadrian9789
@feketeadrian9789 Год назад
Thank you very much! Great tutorial :D
@666motovlog
@666motovlog 9 месяцев назад
I wouldn't believe that was that easy! Thanks!!!
@user-cp7cy5uy1b
@user-cp7cy5uy1b 2 месяца назад
Thank you very much! Very good explanation. Everything works. Cool!
@ordinaryBrownDad
@ordinaryBrownDad 4 месяца назад
Thanks for making this tutorial, great explanation. I was reading the documentation and this gives me better understanding of the implementation
@johnkrator
@johnkrator 11 месяцев назад
I highly recommend this tutorial
@buwo_
@buwo_ 3 месяца назад
Thank you for this clean expression, saved my hours
@kingsley3194
@kingsley3194 5 месяцев назад
Thank you soooooooo much, You saved me hours of worries.
@xeebodog
@xeebodog 5 месяцев назад
Thank you for this, great information. Could this similarly be accomplished by adding a row to the existing aspnetusers tabled called "roles"?
@mohammad6924
@mohammad6924 Месяц назад
Very very thank youuu
@lassemunktechnerd
@lassemunktechnerd Год назад
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?
@Holsp
@Holsp Год назад
Wouldn't it be fine using inly one scope instead of two?
@estebansaavedra3128
@estebansaavedra3128 8 месяцев назад
thank you very much!
@EminHasanov-nj6un
@EminHasanov-nj6un Год назад
Perfect!
@TENBALZ
@TENBALZ 6 месяцев назад
wish every tutorial was like this
@honeylemonteayum
@honeylemonteayum 2 месяца назад
thank you this was great
@user-xw5qu2re4g
@user-xw5qu2re4g Год назад
can you kindly tell me how to prevent 2 registered user with same role to not access each other data in Asp ,net core??
@danhedaiat
@danhedaiat 7 месяцев назад
thank you man
@tphilearnscode
@tphilearnscode 3 месяца назад
thank you bro
@new_direction_net
@new_direction_net 7 месяцев назад
This is Gold 👌
@user-ec3nv8rh9l
@user-ec3nv8rh9l 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?
@favourolanipekun4297
@favourolanipekun4297 5 месяцев назад
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?
@AdrenalSnakeREX
@AdrenalSnakeREX 8 месяцев назад
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?
@ahmedqasem7651
@ahmedqasem7651 5 месяцев назад
Great job
@steenstiller
@steenstiller 5 месяцев назад
How can i customize the "Acces Denied" Page?
@muhammadubaid3800
@muhammadubaid3800 Год назад
I am facing an error because my login functionality does not working. Any suggestions ?
@carnajx6570
@carnajx6570 10 месяцев назад
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 5 месяцев назад
yes this! When they create an account how do we add it so they can pick!
@devmarwat
@devmarwat 8 месяцев назад
It was amazing
@jessor33
@jessor33 Год назад
usefull 🤩
@abdullahalsubei
@abdullahalsubei 5 месяцев назад
man, i love it
@alisadiyathool
@alisadiyathool Месяц назад
when i am trying to log in with the hard coded data , its not allowing me to log in
@user-oh7to8xw3j
@user-oh7to8xw3j 9 месяцев назад
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 11 дней назад
No need to assign the role 'employee' to an admin. Inherently everyone in the company is an employee.
@Josiahtkd
@Josiahtkd Год назад
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 10 месяцев назад
did you find the solution yet?
@scydevcode
@scydevcode 7 месяцев назад
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 3 месяца назад
I get the same error, just now that I thought got close to solve it.
@Emre-qp6fk
@Emre-qp6fk 2 месяца назад
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
@cricomedy7896
@cricomedy7896 Год назад
Make a small project tutorial like Doctor appointment with CRUD operations or any other small project
@tutorialsEUC
@tutorialsEUC Год назад
As Web API or using the standard MVC template?
@krxthx
@krxthx Год назад
​@@tutorialsEUC probably mvc!
@kiolinharisanker8165
@kiolinharisanker8165 Год назад
@@krxthx 100% need it for mvc
@oranasoftware
@oranasoftware 10 месяцев назад
Good tutorial, only do this once in a blue moon and forget how to do it everytime!
@mndilove818
@mndilove818 5 месяцев назад
can i have source code please i cannot see the full code in video that's why source code needed
@jbob34345
@jbob34345 11 месяцев назад
This seems verbose, wouldn't it be easier to add the roles from your application DB context?
@ronrondk
@ronrondk 3 месяца назад
I was thinking the exact same.
@doommortein7687
@doommortein7687 2 месяца назад
Please do a video
@peymannaji
@peymannaji 2 месяца назад
AddDefaultIdentity methods doesn't exist
Далее
ASP.NET Datatables + Filtering and Sorting Data
11:17
НУБ ИЩЕТ ЖЕНУ В GTA SAMP
22:34
Просмотров 334 тыс.
Brutally honest advice for new .NET Web Developers
7:19
Master C# Interfaces in 12 Minutes - Beginner Tutorial
11:37
Don't throw exceptions in C#. Do this instead
18:13
Просмотров 251 тыс.
ASP.NET Core - Roles vs Claims vs Policy
23:11
Просмотров 97 тыс.
The New Way of Calling Your Code in .NET 8 Is INSANE
12:34
How to Become a Highly Employable C# Developer in 2024
17:47
ASP NET Core role based authorization
8:25
Просмотров 110 тыс.