Membership and roles problem.
-
Hi, My i am working on asp.net 2.0 I want to use built in security features. Actually, i used login control for the login. And i am using web.sitemap file for filling for tree view. Using Website Administration tool, i have defined 2 logins and 2 roles. Roles are Administrator and Users. I have assisgned 1 role for each user. I have created 2 folders in my website. 1. Admin 2. User For Admin folder i have given access to Administrator role and for User folder i have given access to User as well as Administrator. And i also denied access to all users for my Admin folder. In web.config file i added membership tag with the provider and specified securitytrimmingenabled true. But, when i execute my application,and give login details tree view is not displayed. What i mean to say, is none of the nodes are displayed. But, if i comment that code in web.config file, My treeview is displayed. But, even the pages inside Admin folder are accessible to Users role also. Can u please help me in this regard. Thanks in advance.
-
Hi, My i am working on asp.net 2.0 I want to use built in security features. Actually, i used login control for the login. And i am using web.sitemap file for filling for tree view. Using Website Administration tool, i have defined 2 logins and 2 roles. Roles are Administrator and Users. I have assisgned 1 role for each user. I have created 2 folders in my website. 1. Admin 2. User For Admin folder i have given access to Administrator role and for User folder i have given access to User as well as Administrator. And i also denied access to all users for my Admin folder. In web.config file i added membership tag with the provider and specified securitytrimmingenabled true. But, when i execute my application,and give login details tree view is not displayed. What i mean to say, is none of the nodes are displayed. But, if i comment that code in web.config file, My treeview is displayed. But, even the pages inside Admin folder are accessible to Users role also. Can u please help me in this regard. Thanks in advance.
SUDHAKAR PALLAM wrote:
But, if i comment that code in web.config file
What code?
SUDHAKAR PALLAM wrote:
But, even the pages inside Admin folder are accessible to Users role also
Accesible?? you mean you can really access them or you can see them on the treeview? If you cant see when you set securitytrimmingenabled = true it must be because you didnt set the permision correctly permisions for the Admin folder: Allow roles = "Admin" deny users = "*" permisions for you users folder: allow roles = "Admin,Users" deny users = "*"
Alexei Rodriguez
-
SUDHAKAR PALLAM wrote:
But, if i comment that code in web.config file
What code?
SUDHAKAR PALLAM wrote:
But, even the pages inside Admin folder are accessible to Users role also
Accesible?? you mean you can really access them or you can see them on the treeview? If you cant see when you set securitytrimmingenabled = true it must be because you didnt set the permision correctly permisions for the Admin folder: Allow roles = "Admin" deny users = "*" permisions for you users folder: allow roles = "Admin,Users" deny users = "*"
Alexei Rodriguez
That membership tag which i added is commented. And regarding the second clarification, It appeared in the treeview as well as i am able to access it. But, when i refresh the page, it is going to loginpage.When i give the same login details of Users role, it is not taking me inside the website. What i mean to say is, it is working properly once i refresh the page.
-
That membership tag which i added is commented. And regarding the second clarification, It appeared in the treeview as well as i am able to access it. But, when i refresh the page, it is going to loginpage.When i give the same login details of Users role, it is not taking me inside the website. What i mean to say is, it is working properly once i refresh the page.