In layout.cshtml I am checking whether the current user is an admin or not. If so, then a different menu is shown. However, it is always returning fal ...
In layout.cshtml I am checking whether the current user is an admin or not. If so, then a different menu is shown. However, it is always returning fal ...
I will first introduce the steps that led me to role authorization problems. First I add 2 roles in my construstor in HomeController.cs The roles ...
Currently, I'm working in one migration request, where we need to change the framework from 3.5 to 4.6.2. Here the problem is after changing the frame ...
Currently i'm working in one migration request, where we need to change the framework from 3.5 to 4.6.2. Here the problem is after changing the framew ...
I'm using WindowsPrincipal's IsInRole method to check group memberships in WPF and Winforms apps. I'm generating an identity token which can be for an ...
In my _Layout.chtml, I want to show menu on the navbar based on the user role. To make it short, I have "Admin" and "User" role. Here is my code in th ...
I have 16 different roles and I'm trying to filter a list according to a users role. I was hoping there was a way to filter this using LINQ but I'm no ...
In my mvc5 project to disable an action link for unauthorized users i did like this But if there are many roles to check then this @if() gets long. ...
I'm using licensed Devart dotConnect product to connect to a PostgreSql database in my ASP.NET MVC5 project. I have problem with Devart Rolemanager. I ...
I've built an application out of Visual Basic with a login screen and a form. The login screen authenticates with Active Directory. After user authent ...
I have an MVC 3 app, using Windows Authentication with Claims using WIF 4.5. Access to the application is controlled (currently) via membership in an ...
I have created a custom role provider for my MVC4 application where I have been successfully able to override CreateRole, GetAllRoles and RoleExists m ...
I'm very new to MVC. I'm doing a Custom Membership asp.net MVC4. Above are the Table & data i have created. I try to override isinrole method ...
I have created my own Authorize attribute called Authorise... I've done this so I can use the roles parameter on the attribute, like this... Thi ...
I have extended the UserBase class in System.ServiceModel.DomainServices.Server.ApplicationServices in my Silverlight RIA, and yes people still use Si ...
I am attempting to check if a given user has a role before they are fully 'logged in' to the site I am building. Typically I would use the code: Bu ...
Is there some setting or permission in IIS 7/Win Server 2008 that would cause WindowsPrincipal.IsInRole to always return false, when the same code run ...
I'm really new to C# so forgive my ignorance. I need to test if a user (DOMAIN\username) is in a particular group, and yes, this includes nested group ...
I am trying to verify whether the logged in user exists in a AD group or distribution list. I tried to use WindowsIdentity but that does not give me p ...
I need to get know how SiteMapProvider.IsAccessibleToUser() works. Built-in XmlSiteMapProvider calls HttpContext.User.IsInRole() which uses System.Se ...