roles

MVC .NET SSL/https website: [Authorize] redirecting using http (NOT https) to login page

别来无恙 提交于 2019-12-12 04:59:49
问题 My website uses MVC ASP.NET and Entity Framework user roles. The website also requires SSL for every page access by design. Thus, call the site example.com which can only be accessed as "https://example.com" or "https://www.example.com". Port 80 is configured to never respond. All pages work fine, except a main page link which can only be accessed when a user is already logged in. If the user is not logged in yet, moving the cursor over the link shows an https:... prefix is assumed to that

How to use ASP.NET Role and Membership in Winform and C# [closed]

守給你的承諾、 提交于 2019-12-12 04:46:29
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . I tried to convert this VB.NET sample here http://www.theproblemsolver.nl/usingthemembershipproviderinwinforms.htm without any success, can anyone know an example ? Thanks 回答1: I just started getting into C# and I'm trying to develop a Windows Form application as well. I am using C# 2010 Express

SimpleMembershipProvider roles not accessible

天涯浪子 提交于 2019-12-12 00:48:29
问题 I have MVC4 application which uses SimpleMEmbershipProvider for authentication mechanism. Everything works fine, apart of when I return to the application and authenticate using persistant cookie. I am authenticated fine, but cannot access roles that I am assigned to. Effectively, cannot access roles at all: string.Join(",", Roles.GetRolesForUser(User.Identity.Name)) returns empty string What might be causing that? 回答1: This can happen when the SimpleMembershipProvider hasn't been initialized

Weblogic Providers

人走茶凉 提交于 2019-12-12 00:22:06
问题 I have created a custom authentication provider that checks if a user exists in a datasource and allows it to login or not. Now I also have to check the roles of that user, but I don't understand if the same provider can take care of Authentication and Role mapping or if I have to do another provider. I had tried to created another provider, for the role mapping, but I can't find it, or not looking in the right place to configurate it, but my MBean type also doesn't any configs to be inserted

adding a specific roles to user to see something on the page

回眸只為那壹抹淺笑 提交于 2019-12-11 21:21:29
问题 although i had this question before but did not get anything useful and am stuck. Ok my app is a simple ebay clone, where i had divided users into roles buyers and sellers with role id 1 and 2. When anyone sign up or login they are transferred to the index page of the app, Now i want buyers to see something different then sellers on the index page and for that I had tried the if and else method but nothing happened. Is am doing anything wrong? I there any other way to get on this. My Index

How do I design the retrieval and processing of all user roles?

旧街凉风 提交于 2019-12-11 18:09:15
问题 I am building an intranet with ASP.NET core 2.0 MVC. All users are part of an active directory. Additionaly I have a MSSQL database with the following tables: Users (Id, FirstName, UserNameAd (unique), ...) Roles (Id, RoleName) UserRoles (User_Id, Role_Id) In my web application I now want to retrieve the roles of a user and store them in the Authentication/Identity Classes of Microsoft in order to use [Authenticate(Roles="Admin")] stuff. I am not sure where I shall put this role-request and

How to create admin roles in Active Directory and restrict pages in my application

我的未来我决定 提交于 2019-12-11 18:05:30
问题 In my application using Windows Authentication, I have been manually creating user roles/ membership stored in SQL (System.Web.Security.SqlRoleProvider enabled in web.config). <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="connMembership" applicationName="/" /> But now, as I am releasing the application, I need to change to using the company's Active Directory groups <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web

django roles authorization architecture

假装没事ソ 提交于 2019-12-11 12:03:04
问题 Hello im new to django and im developing a software for stores, each store from a store chain has their own clients and payments. So there will be a role for a employee of an specific store (that do not need to know about others stores), and there will be a role for the administrator of the stores (who is not the admin of the system, is just another high level employee role) that needs to know about the payments of every store. the model looks like this: class Store(models.Model): id = models

Azure Ad Returning Roles in Claims but User.IsInRole returns false

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 11:27:01
问题 Any idea what might be causing this? I can see the claims in User.Claims The only thing I can think of is that the claims from Azure Ad Roles come back differently than what IsInRole() checks for? CorpAdmin Role showing in claims. User.IsInRole returns false [Startup.Auth][3] Just to clarify, I AM getting roles back but I think they are not being added to the list of claims correctly and I cannot figure out why. Nerith IsInRole or [Authorize(Roles="...")] will correctly check the roles claims

Defining abilities in more complex environment with role and group models

亡梦爱人 提交于 2019-12-11 10:52:06
问题 in my rails app (I use devise and cancan), each (registered) user belongs to exactly one role ('Administrator' or 'Users') but to at least one group (something like 'Family', 'Friends', 'Co-workers'). At runtime, when a new folder (see below) is created, a habtm relation to one or many groups can be set, which defines who can access the folder. Selecting no group at all should result in a world-wide accessible folder (i.e. users do not have to be logged in to access these folders). But right