ASP.NET MVC #12 - Add User to Role | FoxLearn

preview_player
Показать описание
Create User and Assign to Roles with ASP.NET Identity MVC 5 step-by-step using C# Entity Framework Code First for Beginners

Рекомендации по теме
Комментарии
Автор

Hi so i got an error here saying the value cannot be null when i tried to register on the RoleName function,
i checked the RoleViewModel, Register function and views and look really identical to your demo
any suggesstions?

thanhhieunguyen
Автор

thanks for the great tutorial is helps me a lot

tizekesan
Автор

me salvaste el contrato pa indefinido waxo kl maldito gracias

patriciosalvo
Автор

Thank you very much.
Do you have the project on a download location?

vicenzovendetta
Автор

How can I retrieve the user role into my views? And one more question... When you create the role list in the Register method (get) Why have you sent the value with the RoleName instead of the Id?? About the value cannot be null error I fixed creating the same role list just before the method error

jraa
Автор

how to assign more than one role to the user ?

eljokerq
Автор

Does somebody know how to get the list of all users and their roles?

inaizvorean
Автор

@Html.DropDownListFor(model => model.RoleName, new SelectListItem(ViewBag.Roles, "Value", "Test"), new { @class = "form-control" })

SelectListItem doesn't contain a constructor that takes 3 arguments

storylineproductions
Автор

Hello brother, thanks for the work. I did exactly as you did and it almost works fine. But I am getting this error while in registration can you please help? I have been stuck here forever "Role does not exist." but the Role is already created in AspNetRoles table

assaydesta
Автор

:( i dont know how to make view edit user role .. Can you help me...

hieudeptrai
Автор

It says I have to create ApplicationRoleManager class

AzizjanAyupov_leo
Автор

I'm getting this error:

Value cannot be null.
Parameter name: items

joselitoaquino
Автор

Please help I have the value cannot be null? None of the comments seem to work

Liambotha
Автор

How do I show my registered user with their role name in my view page?

amanullahaman
Автор

Sir can you prepare a video in a web application I want visual studio code editor where in user can write code and test it. Just like online coding exams

adilkevin
Автор

I am getting a value cannot be null error.

ashishsingh-nvsh
Автор

how to add role in registration in dropdown in asp net core mvc 2.0

fahadkhalil
Автор

getting value of id null in please help me

tawkirhaque
Автор

Method not found: System.Data.Entity.QueryableExtensions.FirstOrDefaultAsync(System.Linq.IQueryable`1<!!0>, System.Linq.Expressions.Expression`1<System.Func`2<!!0, Boolean>>)'.

Anyone Know why I am getting this error when i try to add new Role, please Help me.

shahzebdurraniwarsi
Автор

can u guys commit this demo to github ? it would be much easier to follow

ahmedbeji