Show or hide navigation menu based on user role in asp net core

  Рет қаралды 91,804

kudvenkat

kudvenkat

Күн бұрын

Пікірлер: 53
@arwahsapi
@arwahsapi 5 жыл бұрын
No words are wasted in your videos. SIMPLY THE BEST!
@Denny-yy9lh
@Denny-yy9lh 5 жыл бұрын
This is very helpful to me. Years ago, I also saw the WCF tutorials video of Kudvenkat. It is also very helpful to me.. Thanks!
@technicalcrackedinterviews4392
@technicalcrackedinterviews4392 5 жыл бұрын
right dear....its very old but helpful
@r.o.9322
@r.o.9322 3 жыл бұрын
I just want to thank you for this video series, you helped me a lot!
@rayt6867
@rayt6867 5 жыл бұрын
Thanks for this video, I often wonder how it was this was done, it is so simple.
@thamimotloung1073
@thamimotloung1073 Жыл бұрын
Thank you I am new in DOT Net and this really helped Alot. Thank you!!!!!
@lazarstevanovic1286
@lazarstevanovic1286 5 жыл бұрын
Congratulations on 500k subscribers, you are the best. Keep going!!
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 5 жыл бұрын
Thank you Lazar.
@kunalsingh1636
@kunalsingh1636 4 жыл бұрын
Sir your all topics is unique and very helpful thanks for uploading and supporting
@olabisiolaoye6168
@olabisiolaoye6168 4 жыл бұрын
Thank you so much for this video. It was incredibly helpful.
@7Andy77
@7Andy77 4 жыл бұрын
I have a problem. When I set the [Authorize(Roles = "Admin")] for AdministrationController, no matter what Role do I have, it always takes me to LogIn page (Account/Login?ReturnUrl=%2FAdministration%2FListRoles). I saw a solution to make custom decoration for role authorization, however, I would like to make it work the normal way, with [Authorize(Roles = "Admin")]. Does anyone managed to solve this?
@7Andy77
@7Andy77 4 жыл бұрын
Ok, that was quick...I have tried to fix it for quite a piece of time before I asked this, and the answer came to me a moment after. Now I will pass the knowledge for the future generations: Make SURE that in your Startup.cs file the app.UseAuthentication(); is BEFORE, not after app.UseAuthorization(); end of transmission. peace
@khouloudachour
@khouloudachour 3 жыл бұрын
@@7Andy77 thankkk youuu , you save my lifeeee
@khouloudachour
@khouloudachour 3 жыл бұрын
@@7Andy77 thankkk youuu , you save my lifeeee
@7Andy77
@7Andy77 3 жыл бұрын
@@khouloudachour you are welcome :) im glad this was helpful! :)
@Superluis125
@Superluis125 4 жыл бұрын
1:36 Where does the "User" variable come from?
@conaxlearn8566
@conaxlearn8566 4 жыл бұрын
Put you mouse cursor onto it and hit F12 to see.
@mhraamirali
@mhraamirali 5 жыл бұрын
When new user register on website which role by default they have? Admin role can edit and delete but in this project every login user can do. How to prevent this on role base in asp.net core.
@noone-eo2wx
@noone-eo2wx 3 жыл бұрын
you are a professional teacher thanks a lot
@shantikontho
@shantikontho 5 жыл бұрын
sir how can I set roles name dynamically in view for condition. here you are set hard code name.
@alihameed2457
@alihameed2457 5 жыл бұрын
East or West. Sir Venkat is the best.
@technicalcrackedinterviews4392
@technicalcrackedinterviews4392 5 жыл бұрын
Nice title
@TheVibhu100
@TheVibhu100 3 жыл бұрын
@@technicalcrackedinterviews4392 Lauda
@gaganmudvari1553
@gaganmudvari1553 5 жыл бұрын
Awesome tutorial series. best of the best vankat. I request you to make some videos series on PYTHON also after finish core mvc this series. thank you. god bless you vankat.
@technicalcrackedinterviews4392
@technicalcrackedinterviews4392 5 жыл бұрын
nice approach ...till then you can visit other links bro.
@rhxxza
@rhxxza 5 жыл бұрын
How to implement dynamic authorization instead of hardcode "Admin" ??
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 5 жыл бұрын
Hello Takky - Do you mean storing the resources and roles mapping also in the DB or a separate config file or something else
@rhxxza
@rhxxza 5 жыл бұрын
@@Csharp-video-tutorialsBlogspot yes sir, authorization to specific action is managed dynamically from db. So when sometimes this action we want to change, we can easily updated it without edit code roleName in Authorize attribute. How to do that? Thankyou anyway, cant wait for next video.
@khairulhisham-w5t
@khairulhisham-w5t Жыл бұрын
great video sir, sir, if the menu we use is menu responsive from css@bootstrap, not the menu from visual studio provide, can we use this way also?
@szafar5797
@szafar5797 4 жыл бұрын
do you have any videos that will allow me to add hyperlinks to the razor page from the controller class
@anandseniyar8814
@anandseniyar8814 4 жыл бұрын
I have a user is Admin Role, cant get access to Administration page(redirects to Access Denied page) and razor page link is hidden when Authorization attribute is applied. Tried logout and login, cleared cache and checked database everything looks fine. Can someone help?
@anandseniyar8814
@anandseniyar8814 4 жыл бұрын
I got a solution in the below link stackoverflow.com/questions/52531131/asp-net-core-2-1-identity-role-based-authorization-access-denied/52546946 The issue was I am using asp.net core 2.1, and if you use AddDefaultIdentity in Startup.cs it does not enable Roles by default.
@floaguirre5978
@floaguirre5978 4 жыл бұрын
I am using asp.net core 3.1 and I fixed it by changing the process model to out of process. In version 2.1 it was default outOfProcess, but from version 3 they changed to inProcess.
@floaguirre5978
@floaguirre5978 4 жыл бұрын
in video 6 of these tutorials they explain how to change that.
@sakthivel-lc9ni
@sakthivel-lc9ni 5 жыл бұрын
Nice explanation sir
@saicharannamada9606
@saicharannamada9606 4 жыл бұрын
Hi everyone.. A small query, if access is denied then it could have gone to other controller, why only the account controller..please help me out to understand that..
@conaxlearn8566
@conaxlearn8566 4 жыл бұрын
I think it's because of this: github.com/dotnet/aspnetcore/blob/master/src/Security/Authentication/Cookies/src/CookieAuthenticationDefaults.cs
@joemarkarnaiz8441
@joemarkarnaiz8441 5 жыл бұрын
nice video Sir.
@melitonvalero6947
@melitonvalero6947 4 жыл бұрын
Got this error: "The type or namespace name 'SignInManager' could not be found (are you missing a using directive or an assembly reference?) [MDPWeb]csharp(CS0246)" and " The type or namespace name 'ApplicationUser' could not be found (are you missing a using directive or an assembly reference?) [MDPWeb]csharp(CS0246)" Im using Visual Studio Code .
@anandseniyar8814
@anandseniyar8814 4 жыл бұрын
Have you added @using Microsoft.AspNetCore.Identity before SignInManager line?
@jitendrakumar8187
@jitendrakumar8187 4 жыл бұрын
Can anyone tell me how to implement global logout in .net core 3.1?
@jgsk78
@jgsk78 2 жыл бұрын
I thought we provide different content and links through different layouts that are set through if conditions in _ViewStart ... as in : if (User.IsInRole("Admin")) { Layout = "_AdminLayout"; } ....etc
@khaledtarboosh3261
@khaledtarboosh3261 Жыл бұрын
Thank you very much .
@amirkian1181
@amirkian1181 3 жыл бұрын
where the user comes from in layout view?!
@manilkumar73
@manilkumar73 2 жыл бұрын
Tq
@floaguirre5978
@floaguirre5978 4 жыл бұрын
For the role process to work, the process model has to be out of process
@saireddy4810
@saireddy4810 5 ай бұрын
But actually you should explain each and everything for this implementation but you did only for few options why
@s3649
@s3649 5 жыл бұрын
.net doctor
@technicalcrackedinterviews4392
@technicalcrackedinterviews4392 5 жыл бұрын
haha absolutely right
List all users from asp net core identity database
11:13
kudvenkat
Рет қаралды 66 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 284 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Add or remove users from role in asp net core
24:30
kudvenkat
Рет қаралды 85 М.
ASP.NET User Roles - Create and Assign Roles for AUTHORIZATION!
19:45
tutorialsEU - C#
Рет қаралды 85 М.
Background Jobs in ASP.NET Core
18:35
IAmTimCorey
Рет қаралды 58 М.
CREATE and CONNECT DATABASES in ASP.NET
18:11
tutorialsEU - C#
Рет қаралды 72 М.
Edit role in asp net core
18:27
kudvenkat
Рет қаралды 69 М.