Security :: Adding Domain User Roles To A Web App?
Jun 18, 2010
I want to make my domain administrators the administrators to my web application so that they are the only ones that can change content. All other users would simply be able to read the material. I am relatively new to web apps and I can not seem to find what I am looking for anywhere on the net.
I have setup ASP security in my application. I used the following tutorial, just wondering if someone can tell me how i can setup this up to allow the creation of a user?
where to find or what to search on to find some example of how to add the option for adding users?
I have the above setup and its working, but only because of the accounts i created with my global.asax file.
I need to give the admins access to add a new user. Currently i can search on existing users and update them, but need to add the ability to add a new user.
I've built a windows 2003 server at work with SQL server 2008, we normally login to a domain of which I don't have administrator access. Is there a way I can build and use a database of Roles to work with logged in users?
i want to implement role_based autherization in an application, the only way i know to do it is to use roles framework, but i don't want to add any extra tables to my database, my database already have a users table with a column that specifies a role for each user
how can i use this framework without adding the tables it requires to my database?
I can access the website I've created on my local machine in debug mode; and with my domain account as a local administrator, if I do this:
[Code]....
I can still access the website; and with my domain account in a Domain Group named "DomainDomainLocalSecurityGroup", if I do this:
[Code]....
I can still access the website; HOWEVER, if I create a Local Group on my machine named "LocalMachineGroup" and I add "DomainMyDomainUserName" to this group and I do this:
[Code]....
I get an Access Denied error trying to access the website. What I want to do is, have a group on my local machine (for testing), on a test web server, and on a production web server named "MyWebsiteUserAccess" with the same Domain Group (filled with Domain Users allowed access to the site) in all of these local groups; so that when I test the web application on my local machine, on my test web server and on my production web server, I don't have to change the Web.config file to have it work on each AND if the Domain Group name ever has to change, it won't affect access to the website.
What am I overlooking or is this even possible to do this way? I understand that there is a way to do Role Management through ASP.NET but I don't understand that well enough yet to implement that (and will probably go that route once I've done the research on how to best implement it for purpose of access control of this intranet site).
I have an interweb web application that uses Active Directory to authenticate the user. Im now getting some complaints that users on other domains are unable to access the application.
How can i make it work so that their domain name is also accepted by the application?
This is my senario. I want user to login and if "LoggedIn" User has more than one role then it displays the list of radio buttons. After selection of the role user gets further privilages according to the role that he has selected.
I've a problem setting up the role. And user can change his role when ever he wants.
For Example "john" is the user having two roles "Account Manager" and "Project Manager".
Ive been exploring the tabls in the membership database to see how they are structured. If i add a new user or update an existing one i see it in the user and membership tables. But i dont understand how to use or store roles. I use the ASP.NET CONFIGURATION toll in the WEBSITE menu to create roles and create access rules, but those roles dont show up in the Roles table in the db!
Yet the roles are stored cause they keep apearing in the ASP.NET CONFIGURATION. How weird is not that? Where is it stored and how can i access it? I need to programatically check if the user who is logged in is in a certain role.
have a project where there are main 3 types of users i have to block them from accessing other pages but without using roles or membership is there any other way to do the same?
I have Use Repeater for my sitre nevigation with sitemap daya source
[Code]....
but my site has 3 user type employee clientadmin and globle admin so employee runs on separate section (SitemapProvider) but clientadmin and globle admin user same SitemapProvider so i need to set two pages visible false for client admin when some one logged in as a client admin how can i do it please give the way with code snippet please thank you for attention
In my project I have one folder called Administration (contains pages created for administrating the public part of the page) and in root I have public pages. What I want to do is to prevent anyone beside administrator to enter the Administration part and to make the Administration/Login.aspx default page for entering Administration part. This part makes me confused. I tried to create the access rules, but that wasn't the option because I upload the images to the Administration/Upload folder so if I deny the users the images on the public part can't be accessed.
The second problem I don't know how to solve is public part of the page where I want to allow commenting only to logged in users (users only, not the admin). How to check if user is logged in and authetificated and how to enable the commenting part of the form to him (textbox and submit button).
I'm using the built-in membership controls and classes to manage authorization and authentication in my app. Here's what I want to do: If the user is in "Manager" role, I want to send him/her to the manager page no matter where he/she came from. If the user is in "Supervisor" role, I want to send him/her to supervisor page no matter where he/she came from. However, if the user is not in any role, just a registered member, I want to send him/her back to where he/she came from as stated in ReturnUrl. If no, ReturnUrl is specified, I will send him/her to the home page.
On my login page, I'm using the Login server control but in my code behind, there's no method wired to the control because the control takes care of everything. I assume I need to add a method and wire it to the submit button, is that right? If so, I'll have to really handle the login event which means I'll need more info about how to do that.
I have users that belong to more than one role and I have a login view for those roles but I only see the first role's content.
How should I be going about getting to see all content for the roles that user is in? My user logs in and is a member of MACED and ADMIN but only sees the links for MACED
In my website i am creating a custom FormsAuthentication ticket during log in. This ticket stores the userid but i also need to specify the role of the logged in user. How do i do it?
I have following situation: A web with a defaults.aspx & login.aspx 2 folders ADMIN & MASTER, in the ADMIN folder is a content page admin.aspx who's master is in the master folder.when I place, following web.config in the ADMIN folder he still is showing the admin.aspx for all users, when I place a new standalone aspx file in that directory the access is denied.Why is de content file not secured ? Must I secure the master file so do i need a new masterfile for each rol, user then...
in that directory<system.web> <authorization> <allow
All I'm trying to do is pull the current user's login name from Active Directory. I've tried User.Identity.Name.ToString, which returned nothing at all. I tried Environment.UserName.ToString, Which returned "NETWORK SERVICE" which is not the firstname.lastname username that I was expecting.
I am using Formsauthentication. My situation is as per below:
the login form has codebehind :
protected void LoginButton_Click(object sender, EventArgs e) { TextBox uname = Login1.FindControl("UserName") as TextBox; TextBox pass = Login1.FindControl("Password") as TextBox; CheckBox rm = Login1.FindControl("RememberMe") as CheckBox; Literal fail = Login1.FindControl("Literal1") as Literal; if (Membership.ValidateUser(uname.Text, pass.Text))
[Code].....
Now the problem is that when I try to login with proper credentials it first redirects to default.aspx( there is no such page in my project), after login again with same credentials it properly redirects to the correct page. Why such problem arises? to fix this?
I wanted to maintain the great features of ASP security control but i couldn't find a way to fit my purposes. I wanted to add in multiple user in one shot instead of one by one, So far using CreateUserWizard control only allow admin to add user once at a time. Is there a way to add in multiple user with a uploaded name list ?
Im creating an application where the user table is stored outside the database, therefore i wont need to use the built-in asp.net user tables. However i would still like to use all the features the asp.net membership security provides i.e. restrict users from certain pages using the web.config
I would like to authenticate the user manually and set roles to that user temporarily only for that session. Is this possible?