i want to create a webservice that reading from the user identity interacts with a db, where there are app names and group that can use that app, and gives to the user a list of operation that he can use.
My question is, is there any table in apsnetdb that does this association or i should create a costum table.
Newb question: what is the standard practice for assigning roles to newly signed-on members. Is it usually manual or is there a way of automatically assigning roles. Being completely new to this, I am confronted by the issue of my site having three different roles that new members could fall into, but am unsure about how to assign each a role. I can't imagine having to go through the process manually if I have thousands of members.
I have used .net login control to authenticate user,i have three types of role ,role1,role2 and role3 and i have users and user have different roles.
now my requirement is like as per loggedin user i want to redirect user on particular page as per role.
for example if loggedin user role is role1 than he will redirect default1.aspx for example if loggedin user role is role2 than he will redirect default2.aspx for example if loggedin user role is role3 than he will redirect default3.aspx
and one question if same user may be have more than one role than what should happen???
I got a solution for same than if we are used "loggingin" event than it would be possible but i had placed login control in login view anonymous template because as per my requirement i want that after successfull login user can't see login control on page.thats why i didn't get the login control event on code.
can any one tell how to create the roles in asp.net? when ever Admin creates the roles, there it self he should assing the pages,which pages should be open when ever perticular person enters in to the site. When ever Admin wants to assing the Roles,all pages appear in grid view with check box,if he checks that pages,he able to access other wise he couldnot access that page.
I have created 3 different folders (admin, user, viewer) in my site and each has a different template (masterPage). I created user and roles which are admins, users, and viewers. I assigned each role to a user in .Net administration Tool.
What I need to do is to allow each user to access his page only and deny access to others , except for the admin who can access all pages.
I'm trying to redirect users upon login based on their roles which were defined in the Administer website feature of asp.net.Heres what I'm trying protected void Login1_LoggedIn(object sender, EventArgs e)
Im trying to redirect different roles to different pages. Its working but the code I'm entering allows people through even with incorrect passwords. protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
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?
I am currently having a spot of bother in something im trying to create. I want it so when a user who is in a certain role logs in they are directed to a certain page, and any other normal users are directed to another page.
I think i have this sorted via code but...
-The first time it will work, the 'admin' user will get directed to the appropriate page
-I then log out and log in as a normal user and get directed to the appropriate page
-then when i log out of that users account and back into the admin one i get directed to the normal users page instead.
-additional to this, I tried it on a different machine logging in as the admin user only to be redirected to the normal users page (is my session being stored somewhere?)
Ive traced through the problem and the user name and password being subbmitted are what they should be, yet it skips the true part of my IF statement for being in that role.
Here is my code I am using on the login form:
-When stepping through if seen it work and not work with the same values, I cant understand the logic of its inconsistency
the code i am using for the logout is (this is on my masterpage):
well i have a simple application using an authentication (user and password) before accessing and there are several roles bound to each user.
in my web.config i have configured the acces for each page according to each role, this is an example below:
and i have 2 users:
1: admin (default role: administrator)
2: guest (default role: role1)
my problem is as follows:
if i give acces to the user "guest" to open the "admin.aspx" page with changin him his role from "role1" to "administrator", this one do not function except if i recharge the web.config file to the server it's just after this manipulation that this user "guest" arrives to open the page "admin.aspx".
i don't know why this problem occurs, normally changing the user role will applies instantaneously.
We have an ASP.NET web application that has been around for over 4 years now. The web app uses ASP.NET role management with a custom role provider. The custom role provider connects to a database which includes tables for Users, User Groups, and Roles, with a table linking roles to user groups.
Over the years the application has grown in functionality and roles have been added. We now have around 30 roles and there is a complaint that it's not clear (due to lack of documentation, bad naming or whatever) what functionality a particular role gives a user.
Is there guidance on how to make the relationship between roles and functionality more transparent? list out the application functionality in another table and create a relationship between Role and Functionality. The application security would then be programmed against the items in the Functionality table, and the relationships between role and functionality could be maintained through a UI.
To me this approach doesn't quite fit with the concepts behind ASP.NET role based security. All the framework code methods refer to roles, e.g. "RoleProvider.IsUserInRole(string username, string roleName)" and:
is there a way to share roles from aspnet_roles table of aspnetdb between web app and services? Because trying to create roles from un app and trying to access the roles from an service i noticed that app and services see only their roles.