Questions tagged [asp.net-roles]

ASP.NET role management helps you to manage authorization, allowing you to specify which resources various users in your application are allowed to access. Role management lets you group users by assigning them to roles.

226 questions
0
votes
0 answers

ApplicationUserManager GeneratePasswordResetTokenAsync Invalid column UserId

When using GeneratePasswordResetTokenAsync I get three invalid column warnings, two for UserId and one for RoleId. I believe this has something to do with AspNetUsers relationships, which I have not edited in my database. I am running the code…
0
votes
1 answer

What is the code that checks Roles with [Authorize] attribute using custom storage providers for Identity?

I've asked a similar question before but did not get an answer to help me understand how custom storage providers for ASP.NET Core Identity work, so I'm going to try asking the question in a different way. Assuming I have a custom storage provider…
Lukas
  • 1,699
  • 1
  • 16
  • 49
0
votes
2 answers

Asp.Net Core 3.0 MVC Identity Adding Role Problem

I am trying to add identity role for my ASP.NET project. When I am add .AddRoles(); under Configure method it is not working. public class IdentityHostingStartup : IHostingStartup { public void Configure(IWebHostBuilder builder) …
yny
  • 90
  • 8
0
votes
2 answers

How do I make and use JWT role based authentication?

I follow the tutorial link below. https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login I am trying to understand how it works and I want to use role-based authentication using…
0
votes
0 answers

Blazor Authentication & Authorization

I am trying to build a simple app. I have used the Blazor default project and modified it. The thing I want to achieve is that when you log in, the navbar menu to display two more options - Counter and Fetch Data. I have created my own policy and a…
0
votes
1 answer

Implementing roles with custom storage provider for Identity

Recently, I was able to successfully implement authentication (SSO with ADFS using WS-Federation) for an app. Now, I am trying to understand and get authorization working, so this question may be unclear. I'm using this topic to implement roles with…
0
votes
1 answer

How do I make ASP.NET Roles use MySQL?

I tried following this: ASP.NET Membership/Role providers for MySQL? but I get a SqlException that says "Error locating Server/Instance Specified". Got any ideas on what I could do? Web.config membership:
0
votes
0 answers

Role based navigation to areas at registeration and login time ASP.NET CORE DefaultIdentity

I am working on a project in which when user register himselft it is assgigned a role(At Registeration Time) like doctor or patient and depending on that role he will be redirected to Doctor or Patient Areas. Same for login,when login user will be…
0
votes
1 answer

Item specific permisions in an ASP.NET MVC Site

I'm creating my first site in ASP.NET MVC and I'd like to know how I can setup access rights or roles based on a specific item for a specific user. My site has projects and users where each user can be a member of one or more projects. Each user…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
0
votes
1 answer

Install roles and membership to a specific database in command prompt

I would like to install membership and roles to a specific database. It seems to create a new database : aspnetdb. I tried using the GUI (Wizard) but that installed personalization. I tried adding "...Localhost/DatabaseName" but that didn't work.
David
  • 5,403
  • 15
  • 42
  • 72
0
votes
1 answer

Windows Authentication Complex AD Group Names

I'm using Windows Authentication and AD groups as roles. I got the following to work: @User.IsInRole("DOMAIN\ADGroupName") After some testing, it seems this only works with the Display Name, not the Alias of the AD group. Most groups in our domain…
Ali Almohsen
  • 1,311
  • 3
  • 13
  • 24
0
votes
1 answer

How to associate a role to a user in MVC 5?

On WebForms i used to store the role in FormsAuthenticationTicket userdata, however I tried to implement the same method in mvc 5 and it did not work. For some reason User.Identity.IsAuthenticated this returns false var ticket = new…
Jackal
  • 3,359
  • 4
  • 33
  • 78
0
votes
0 answers

Implementing Roles in ASP.NET web forms application

This might be a stupid question to ask but I am kind of a confuse here I am working on an ASP.NET web forms application and I need to implement roles base access to users. This application is working with Active Directory so there is no login forms…
jazz b
  • 437
  • 1
  • 6
  • 15
0
votes
1 answer

ASP.NET Object reference not set to an instance of an object after deploying in IIS8 - null exception in group roles editing

After deploying our solution on iis8 we have got a problem due to editing GroupAdmin or User. the problem occurs whenever we are trying to edit a user or a group roles. When in local testing there is no error. After debugging the problem remotely…
ghada
  • 143
  • 1
  • 3
  • 13
0
votes
1 answer

How to pull user roles from database when wiring up OAUTH for ASP.NET Identity 2.0?

I'm working on some Web APIs, and have been tasked with adding role based authorization to some of the endpoints using ASP.NET Identity 2.0. I have created an API based administration structure for managing users and roles, and have hit a sticking…