Role Provider Security Trimming Issue

Discussion in 'ASP .Net Security' started by tim.cavins@gmail.com, Sep 12, 2007.

  1. Guest

    I have set up my project to use Security Trimming by editing my
    web.config file.

    I added the securityTrimmingEnabled = "True"

    I added <roleManager enabled="true" />


    In my Site map provider .vb file, I override the IsAccessibleToUser
    function to query a database to get application specific roles. I then
    loop through the node.Roles looking for a match in the user roles. I
    then return true or false to enable the menu item to appear.

    This all works great when I run the application from Visual Studio.
    I'm able to see the Administration section.

    However, if I go to http://localhost/mysite directly, I do not see the
    Administration link.

    Can anyone provide any insight as to why I can only see it when
    debugging in Visual Studio?

    Tim
     
    , Sep 12, 2007
    #1
    1. Advertising

  2. Guest

    I should practice what I preach.

    I had allow users = "*" above deny users="?"

    So my roles were never being set for the user.

    Removed allow users="*" and it works fine...


    On Sep 12, 4:58 pm, wrote:
    > I have set up my project to use Security Trimming by editing my
    > web.config file.
    >
    > I added the securityTrimmingEnabled = "True"
    >
    > I added <roleManager enabled="true" />
    >
    > In my Site map provider .vb file, I override the IsAccessibleToUser
    > function to query a database to get application specific roles. I then
    > loop through the node.Roles looking for a match in the user roles. I
    > then return true or false to enable the menu item to appear.
    >
    > This all works great when I run the application from Visual Studio.
    > I'm able to see the Administration section.
    >
    > However, if I go tohttp://localhost/mysitedirectly, I do not see the
    > Administration link.
    >
    > Can anyone provide any insight as to why I can only see it when
    > debugging in Visual Studio?
    >
    > Tim
     
    , Sep 14, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jesper Stocholm
    Replies:
    2
    Views:
    8,219
    John Saunders
    Aug 23, 2003
  2. Liet Kynes
    Replies:
    0
    Views:
    527
    Liet Kynes
    Nov 26, 2003
  3. Paul
    Replies:
    0
    Views:
    363
  4. sloan
    Replies:
    1
    Views:
    551
    Chad Scharf
    Jul 3, 2007
  5. Kursat
    Replies:
    1
    Views:
    334
    Dominick Baier
    May 7, 2007
Loading...

Share This Page