How To Add .net User .net Roles For Application From IIS
Sep 6, 2010I am not sure is there any other way to add User for my application othe than using Asp.net Website admistration tool??
View 1 RepliesI am not sure is there any other way to add User for my application othe than using Asp.net Website admistration tool??
View 1 RepliesLet's say I have a rolegroup as follows:
<asp:LoginView ID="lvDoSomeStuff" runat="server">
<RoleGroups>
<asp:RoleGroup Roles="RoleOne,RoleTwo">
<ContentTemplate>
...
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
Is there a way I can make it so that a user must meet RoleOne and RoleTwo to satisfy the RoleGroup? By default, if a user is in either of the two roles, they will be granted access. I know I can do this via the code-behind, but I'd prefer to be able to wrap some content template with this markup instead of having to wrap it in a panel and hide the panel programmatically.
i need a script on ASP.net that can build this form.
1.Users === Drop Down Menu then in the Drop down should be the names of all Taafoo staff.
In Below link show to how to Imaplement role based security, Page access and show / Hide Menu items based on Role in asp.net
[URL]
But My Questions is How to Register Admin and Client user?
I'm developing a web application I want to use the role authentication to control different parts of the website accessibility. But my problem is say I implemented a upload and download functionality on one of the page and I want to have the ability to control a user whether they can either upload or download; or both. So, I'm not exactly sure if the role base authentication can support a user with more than one role to work the way I want it.
View 1 Replieshow to implement our own role provider?
View 1 RepliesI just launched my application to the production environment. I have a section on my website that is only accessed by users in the role administrator. (Here is the code:
[Code]....
It does fine on the development application. But on the production app the function is not working. I checked the database and everything is the same. What should I do?
Here is my code in the web.config
<
authorization
>
<
allow
roles="Administrator"
/>
</
authorization
>
<
roleManager
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
defaultProvider="SqlProvider"
Computergyrl
>
how to display the exact same page in
Eg:http://localhost:49316/asp.netwebadminfiles/security/users/addUser.aspx
I am baffled, I am using a treeview to set the source of an iframe. The web page is being displayed correctly, but User.IsInRole("roleName"), in the code behind, always returns false. The strange thing is User.Identity.Name returns the correct user name. I have tried setting the target of the tree view nodes to "_blank" and to "_self" and still no luck. So, it doesn't appear that the problem is related to the iframe.Before the treeview was added, javascript was used to set the source for the iframe and User.IsInRole returned the correct values.
View 4 RepliesWhat if, I'm not using the LOGIN CONTROL but rather creating a Custom Control for Login. Is it possible to have user roles and a site map that redirects to its own destination when the user login?
View 1 RepliesIm 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..
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?
http://weblogs.asp.net/scottgu/pages/Recipe_3A00_-Implementing-Role_2D00_Based-Security-with-ASP.NET-2.0-using-Windows-Authentication-and-SQL-Server.aspx
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.
The Faking User Roles document in SDN appears to give exactly what I need. I have a few "roles" that I have access to through stored procedure calls I don't control, read-only, via a CRM I don't have direct access to.
Unfortunately, I can't find the method AddRole, or even the class UserItem, by its present name. Does this functionality exist in Sitecore 6.2? If so, where is it?
I'm trying to show a user's roles in a label but here's what I get when I view the page in the browser:
[IMG]http://i887.photobucket.com/albums/ac76/scoobymadterry/teamadminpage.jpg[/IMG]
As you can see instead of the roles, System.String[] shows in the label. How can I get the roles instead of that?
I am creating a Web Application in asp.net 2.0 and sql server 2005.I want to use an existing database.
I have created a login and a signup page. Then i replace the new SQL database (the one that is created automaticly by the visual studio) with the exiting database I have.If I create a new user, the new user goes to the database and I can login with the new user. I cannot login with the existing users.If I go to the asp.net configuration, I only can see the new users I have created, I cannot see the users that were in the database already and I can't see the roles also.
I can I make the new application to recognize the users and roles of the existing database?
I am working on an application that resides on a development server on our internal network. The application was originally written to use Membership and Roles. We got busy almost a year ago before the app was finished, and now we are trying to get it ready to use internally.
The login page works just fine, but I have lost the ability to controls users and roles. I am running Visual Studio 2010 Professional now on a Windows 7 VM. I can open the application fine but there is no Web Administration Tool available for me to manage users or roles. If I go to Website -> in Visual Studio, there is no option for ASP.NET Configuration in the drop down menu. It simply isn't there.
How can I regain access to manage users and roles for this application? We are using Forms authentication and the database resides on a SQL Server 2005 instance on a separate box from the web server and my local VM.
How to Direct Users to specific Page By roles?
View 10 Repliesi 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.
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".
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.
View 2 RepliesIve 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.
I am busy writing my own custom attribute for my action method called MyAuthorizeAttribute, I am still busy writing the code, here is my partial code:
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class MyAuthorizeAttribute : AuthorizeAttribute
{
public new Role Roles;
public override void OnAuthorization(AuthorizationContext filterContext)
{
base.OnAuthorization(filterContext);
if (Roles != 0) // Did it this way to see what the value of Roles was
return;
// Here I am going to get a list of user roles
// I'm doing my own database calls
filterContext.Result = new HttpUnauthorizedResult();
}
}
Here is my Role enum:
public enum Role
{
Administrator = 1,
SuperAdministrator = 2
}
My action method:
[MyAuthorize(Roles = Role.Administrator|Role.SuperAdministrator)]
public ActionResult Create()
{
return View();
}
The reason why I did not use Roles = "Administrator,SuperAdministrator" was because the roles are hard-coded. I don't want to have a 100 places to change if the role name changes.
Given my method, when it gets to if (Roles != 0) then Roles total value is 3, how would I check to see if these 2 roles is in the list of user roles for a specific user?
Am I doing it correct here? If not how would I otherwise implement this? It doesn't have to be the way that I did it in.
In a standard, generated list view, how can I hide certain ActionLinks based on the roles the logged in user belongs to?
View 1 RepliesI'm trying to add a step into a Create User Wizard to set roles, but it don't works, it create the user but don't set the role,
[Code]....
using System;
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?
View 3 Replies