roleprovider

ASP.NET MVC2 custom rolemanager (webconfig problem)

Structure of the web: SAMembershipProvider.cs namespace User.Membership { public class SAMembershipProvider : MembershipProvider { #region - Properties - private int NewPasswordLength { get; set; } private string ConnectionString { get; set; } //private MachineKeySection MachineKey { get; set...

WSAT Security tab error for Custom Role provider

I have created custome Membership Role and Profile provider using INGRES db. Now I can see my IngresMembership and IngresRole provider in the Provider tab(Select a different provider for each feature (advanced) ) of WSAT but when I clik on security tab I get this error: "There is a problem with your selected data store. This can be caus...

Forms Authentication Role Provider based on Sharepoint Site Groups?

Are there any custom role provider implementations which use the Sharepoint Site Groups as equivalent roles? Ideally, I'm looking to programatically add / remove members from roles which are equivalent to the site groups. The site groups are already being used to allow / restrict access throughout the site and I would prefer not to have...

Is it possible to block a page from opening using securityTrimmingEnabled=true

I have custom SiteMapProvider and RoleProvider that works together properly: IsAccessibleToUser returns false if current user's role isn't mentioned in SiteMapNode.Roles for page requested. So breadcrumbs or menu doesn't show an item. But user still can type now showed URL directly and open a page. How can I block such behavior? Also ...

Extending the RoleProvider GetRolesForUser()

The GetRolesForUser() method in the RoleProvider takes the user login name and returns the list of roles for that user. But in my application this is not enough, I need a few more pieces of information to be able to get the user's roles. How can I get this extra information into the method? I have it in the Session, but I found out tha...

Why wont my custom role provider update the roles when I change the database?

I am building a small CMS system with ASP.NET MVC and I have a custom role provider using a userRepository instantiated by a factory implemented using Castle Windsor. Someone with admin privileges can change the roles of a user, saved in a database, using the back-end administration. But whenever I log onto the user for whom I just c...

ASP.NET MVC Custom Membership Guide

Hello There I am trying to make the move from PHP to ASP.NET. I have about 10 years experience with PHP, and 4 with C#. But I having problems with the authentication and membership system in ASP.NET. So i have spend quit a lot of time finding a guide on how to create a membership provider for a custom database setup from scratch, but i ...

ASP.NET MVC2 Authentication form with localization

I have two level authentification, first the user enters their nt/password and it is validated by LDAP and afterward I have a custom role provider that make sure the user has access to said page. That being said, in my web.config I have: <authentication mode="Forms"> <forms loginUrl="~/Account.mvc/LogOn" timeout="2880"/> </authentica...

ASP .NET Custom RoleProvider not resepecting cacheRolesInCookie="true"

I've implemented a custom role provider, and configured it in my web.config file like this: <roleManager enabled="true" defaultProvider="TDRoleProvider" cacheRolesInCookie="true"> <providers> <clear/> <add name="TDRoleProvider" type="TDRoleProvider"/> </providers> </roleManager> I've overridden the GetRolesForUser function...

Merging organization unit and business roles in ASP.NET web application

In real-world enterprise web applications for enterprise businesses, we always need to limit the access to the data by the user's unit and role. Consider that we have an enterprise company with many shopping stores in a country. So the company has headquarter which has view access to all invoices and statistics for all branches. ...

reject user to specific view ?

i have mvc2 project and i make custom role Provider I'm using attributes [Authorize(Roles = "Admin")] to prevent an authorized user from doing some actions that always reject user to log in view i want to change that and redirect user to view that I'm tilling him that he isn't authorized for this action [Authorize(Roles = "Admin")] ...

Is it necessary to override the membership and the role providers?

Hi, I'm working on a web app and I don't want to store the connection strings in the web or app config because of the requirements. So far I have found the only way to achieve this - to override the membership and the role providers. I also don't fully understand why do I also have to override a role provider when all authenticatio...

Associations among users in ASP.NET Membership

I want to create associations between users in my application. For instance there is a Program Director (Role:PD) which has many Residents (Role:Resident), similarly there is an APD (Role: Asistant Program Director) to each PD. To each PD I want to show him only those Residents which belong to him i.e I want to filter the Residents by t...

Why am I having this RoleProvider problem?

I currently have 2 simple ASP .Net applications. Both applications share the same aspnetdb membership database for membership, roles and providers and the same encryption and decryption keys. They also have seperate websites and seperate application pools in IIS. The problem I am having is that despite both applications having a role pr...

Web.Config Error using Web Application

Hi, I use this Web.Config file. If I use Web Site Administration Tools as "Web Site" all is working great. If I use the same script as "Web Application" I receive and error in tab "Security". Error: "There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permiss...

how to create multiuser login form...in Visual studio....?

m creating a project on hospital management ...with C# code but the problem i m not able to do what i want ..... !. its like i want to create multiuser login like if admin will login with his/her id and password he/she can access all the field in the project but if cashier will login with his id and password he will only able to access...

sample c# code to manage roles with roles provider

i want to implement asp.net role provider to assign users over my LAN to roles and have my asp.net intranet app implement security based on roles. i dont want to use VS to manage this with the built in tools but rather hand this off to users to manage themselves. i want an admin folder with a page(s) for admin roles to be able to create...

ASP.NET MVC Role Providers for MySQL

Hi, I tried to setup role provider, using this article. It worked partially - provider created some tables in MySQL, but I cannot access it from ASP.NET Configuration Tool. I get following error, while trying to add some roles (Roles->Create or Manage Roles): A network-related or instance-specific error occurred while establishing a c...

The Role Manager feature has not been enabled.

Got the ProviderException : The Role Manager feature has not been enabled. So far so good. Is there somewhere a method that can be called to check if the Role Manager has been enabled or not? ...

asp.net role provider- get users email address?

i am using role provider and have it managing users on my intranet via their windows logins. how can i pull their email address and maybe some other user content from asp.net using their user info? do i need to hook into active directory? a sample fir this would be great if this is the way to go thanks all ...