Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Membership and roles problem.

Membership and roles problem.

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netdata-structuressecurity
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SUDHAKAR PALLAM
    wrote on last edited by
    #1

    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.

    A 1 Reply Last reply
    0
    • S SUDHAKAR PALLAM

      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.

      A Offline
      A Offline
      AlexeiXX3
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • A AlexeiXX3

        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

        S Offline
        S Offline
        SUDHAKAR PALLAM
        wrote on last edited by
        #3

        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.

        A 1 Reply Last reply
        0
        • S SUDHAKAR PALLAM

          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.

          A Offline
          A Offline
          AlexeiXX3
          wrote on last edited by
          #4

          It seems weird How did you set the permission (web.config)??

          Alexei Rodriguez

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups