Web Forms :: Assign Roles To Users Using Forms Authentication
May 7, 2015
how to implement role based security in asp.net 4.0, in detail. Like from Data base to UI. how I wanted to implement. On page Load, drop will be filled with all available roles, with list of all check boxes(basically it will equal to the no. of links on the left side tree) below, I will select required boxes and then save. If that particular user with that role logged in, then we will load only those links which this role is having ( of course we will assign that user with the spefic role).
View 1 Replies
Similar Messages:
Feb 9, 2010
I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an encrypted password format), and a SqlRoleProvider. I need to know if it's possible to administer the users (create new users, assign them to roles, etc.) from a windows application - the powers that be don't want any administrative functionality in the web app itself.
Here is the membership provider definition from web.config:
[code]....
So, obviously, I have a Sql Server database that contains the users and roles for the web app. I'd like to create a separate windows app that references the web app assembly, and use the configured MembershipProvider, RoleProvider, and machineKey to create users, assign users to roles, etc. If that's not possible, I can duplicate the configuration settings from web.config within the windows app. But I don't know how to do this either.
View 3 Replies
Feb 18, 2010
I have set up a very simple authentication page where the user enters his password and if successful authentication occurs the program allows the user to make use of the controls in the page.
I used ASP.Net Configuration to create the user and roles, SQL Membership Provider for the authentication tables and asp login controls to authenticate.
Is there any way to add users and roles once the project is deployed? Could I use the ASP.Net configuration page? and if so how?
View 3 Replies
Jun 22, 2010
I've created a very simple website with two roles, "administrator" and "employees". I've also added users using asp.net configuration wizard for both. My concern, however, is that going ahead it will not possible to use the wizard to add new roles, assign them or alter them once the site is online. I won't be the administrator and so I need to find a way for the administrator to add new roles and assign them to users from a remote connection. Where can I find some information on creating such forms?
View 3 Replies
May 7, 2015
Other than WSAT as I don't want to have to use the CMD bypass to access it using VS 2013, how can I administrate users/roles on my web forms web site and be able to administer them via the website from a different location.
View 1 Replies
Sep 7, 2010
I am developing a website in which i am using forms authentication. We have 2 log in pages.one for user another for admin. I added this code into webconfig file for user.
<forms loginUrl="Login.aspx" defaultUrl="Home.aspx" >
I am using this code for user side when user successfully logged in.
FormsAuthentication.RedirectFromLoginPage (UserName.Text, chkPersistCookie.Checked)
I am not using the default user membership database.i have my own data base in sql server 2005 I want same thing for admin,but the default url is Admin.aspx & login url is adminlogin.aspx for admin. How can i assign in web config file for admin?
View 2 Replies
May 10, 2010
assigning roles to Active Directory validated users?
View 3 Replies
Aug 23, 2013
I want to assign page-wise rights to user at the time of registration. So, that he or she can have the rights to access those pages only.
View 1 Replies
Mar 2, 2010
I am not really sure if this post should go in the Security section or the Active Directory / LDAP section....with that being said I am looking for advice on how to best accomplish my goal(s), I am working with FORMS authentication, using active directory (across 2 domains). I have got authenticating working correctly based upon the article at: [URL] now - my questions:
1. What is the best way to deal with roles? What I would like to do is restrict access to my application so that only the users that are authorized to use the application can login - not everyone in the AD. My gut feeling tells me I would use an AD group for this. Furthermore, a subset of these users in this group will be allowed to access the data maintenance forms
2. Ideally, in a perfect world, I would like to write this authentication piece as a separate project - this way it could be used for multiple projects - the only thing different would be the AD groups it would be checking. Is there a way that I could set which AD groups or roles in each projects web.config?
Am I approaching this the correct way? What is typically done?
View 7 Replies
Jan 11, 2010
Im now in assigning a roles to a user. But, 1 of my user wants me to assign 2 roles for him.. The situasion is like this :
I have a few roles which are :
- zone head
-zone officer
-clerk
The problem is now 1 person can be assign for 1 role only..
How can i assign 2 roles for 1 user..
View 4 Replies
Jul 26, 2010
i am using asp.net built-in membership and role provider.
In my application Admin Create account for user.
currently i am assigning roles by going to asp.net configuration website.
kindly tell me how to add an extra step of Select Role in creat user account API.
View 2 Replies
Mar 26, 2010
I'm developing a system where we want to restrict the availability of information displayed to users based on their roles.
e.g. I have a tabled called EventType (ID, EventTypeDescription) which contains the following records:
1, 'Basic Event'
2, 'Intermediate Event'
3, 'Admin Event'
What I need to achieve is to filter the records returned based on the username (and hence role) of the logged-in user. e.g if an advanced user is logged in they will see all the event types, if the standard user is logged in they will only see the basic event type etc.
Ideally id like to do this in a way which can be easily extended to other tables as necessary. So I'd like to avoid simply adding a 'Roles' field to each table where the data is user context sensitive.
One idea I'm thinking of is to create some kind of permissions table like:
PermissionsTable
(
ID,
Aspnet_RoleId,
TableName,
PrimaryKeyValue
)
this has the drawback of using this is obviously having to use the table name to switch which table to join onto.
Edit: In the absence of any better suggestions, I'm going to go with the last idea I mentioned, but instead of having a TableName field, I'm going to normalise the TableName out to it's own table as follows:
TableNames
(
ID,
TableName
)
[Code]....
View 4 Replies
Jun 14, 2010
On our production servers, the admins created a WebUser active directory account which is users for anonymous access to IIS and is also used to authenticate database access with our SQL Server instances using Integrated Security=SSPI in the connection string and identity impersonate="true" in the web.config.
I've often come across situations where I would like to or even need to use forms authentication. However, I using forms authentication, Integrated Security seems to use the logged in user's credentials to authenticate against the database. In these cases I have changed the connection string to use the credentials of a SQL Server users instead. I would prefer to not have a hard coded username and password in the connection string or rather worse in code. Is it possible to use forms authentication just for user authentication for users and windows authentication with the IIS user for database access? What would be the best practice in such a situation?
View 1 Replies
Feb 23, 2011
I have an issue with loginUrl parameter on Forms authentication. Forms Authentication always redirect unauthenticated users to ~/Account/Login ignoring the url configured into Web.Config.
This happend if i add reference to WebMatrix.WebData,WebMatrix.Data into main web.config file (system.web/compilation/assemblies). N.B.: Moving this reference to child web.config file (the one contained into View folder) error doesn't occour anymore
View 2 Replies
Mar 22, 2010
I have an ASP.NET web application that is using forms authentication. Everything is configured and working correctly. However, i'm dealing with the issue of creating and maintaining users and role membership.
I know that I can roll my own solution but I'm wondering if there is an alternative solution?
Does iis7 provide screens for managing forms authentication users? Is there a reliable, free solution that someone would recommend?
View 4 Replies
Jan 5, 2010
I am trying to create an Intranet application and I want my users to be able to log in with their windows account. However my organisation has over 150000 employees but I only want the 10-12 people in my department to be able to log in.
How do I do this? Do I need to store the 10-12 users in a database?
View 2 Replies
Feb 19, 2010
How do I migrate users from a existing users table to Forms Authentication?
There seems to be three options:
T-SQL - Iterate through the existing users table and insert into Forms Authentication tables using the stored procedure aspnet_Membership_CreateUser Code - create a utility that will iterate through the existing users table and insert into Forms Authentication tables using Membership.CreateUser() Code - as users login verify credentials against existing users table and insert into Forms Authentication tables using Membership.CreateUser()
Which is the most practical?
I have been currently trying option 1 but I am running into difficulties using the password salt to create the encrypted password from a plain text password
View 3 Replies
May 7, 2015
URL....I use this one as my login, and I addes hyperlink for Forgot Password. But why I can't access the FORGOT PASSWORD.aspx for every time I click it. And when I login it redirects t Forgot Password.How I can access it without logging in?
View 1 Replies
Mar 11, 2010
I set up forms authentication in my asp.net application, and everything works apparently without problems. However from time to time some of the users trying to log in inform me that suddenly they cannot enter anymore as their user seems to be deactivated. Even if they try the forgot password entry, they get "user not found" response, but if I check the user is still there, and according to asp.net configuration it is even active.The only solution I found until now to reactivate the user is to remove it and create it again, and then it works. But it cannot work like this of course.
View 5 Replies
Aug 7, 2012
i have one web service how can i give access to that web service to many user(with secure method). Now i am checking url and only doing for one site. So what should i do.
View 1 Replies
Sep 2, 2010
I am using ASP.Net Forms Authentication. My Web.config looks like this.
[code]....
So currently every aspx page requires authentication.
I want to allow access to even unauthenticated users to a specific page named special.aspx. How can I do this?
View 2 Replies
Jun 16, 2010
For some reason my users are logged out of the system every 10-15 minutes or so...regardless of the configuration below....am I missing something?
[code]....
View 1 Replies
Oct 1, 2010
I have the following implementation and I'm sure there is an easy way to do what I want to do but I can't figure it out.
1. I use forms based authentication to authenticate to my site
2. I use active directory to authenticate the users
3. I use the Allow Users="xxx" tag to authorize the users limited to the list that can access my site. (e.g.. even though Mary is an AD user she can't access my site unless I put her credentials in the allow users tag in the web.config file)
All is working well but I want to move the users access list (e.g.. <allow users="john" />" from the web.config to a database table so that I can create a user maintenance page for my admins to add and delete user access. For the life of me I can't figure out how to do this and I can't seem to find an article on it either.
[code]....
View 1 Replies
Feb 15, 2010
I'm looking to be able to manage my users and roles online. So that I don't have to re create the wheel, is there a way I can upload the asp.net configuration tool for my website?
View 4 Replies
Jul 2, 2010
I'm workin with Visual studio 2010 and I'm trying to create an ASP.net Web Site, language used - C#
I have 2 different pages, for 2 different users with 2 different roles.Each page has a textbox.I have already created them.What I want to do, is to make a bind between this 2 textboxes, so that the second to get the first boxes' text.I managed to do it, but only if the textboxes are on the same page, very easy (Textbox2.Text=TextBox1.Text) . But how to do it for 2 different pages, for 2 different users with 2 different roles?
Another trouble would be....How can I connect the both users same time....after i start debugging the project, I do a sign in but when I sign in with the second user,the first is automaticly siggned out and the text it's lost.Then, how can they synchronize and the second user see what the first one wrote,using that 2 textboxes? Wich is the solution?
View 4 Replies