Location Tags in web.config

Discussion in 'ASP .Net' started by Joey, Aug 8, 2007.

  1. Joey

    Joey Guest

    We are using location tags to control access to certain folders in our
    website. That has worked great. But now we need to be able to allow
    the customers to change the role names through the website interface.
    I have handled all needed changes in the code, except for one.

    In web.config we have access controlled with a line like...

    <allow roles="Administrators">

    In my code I have a static Website class that keeps track of the
    current Administrators role name, no matter what they name it. I
    access it with something like
    "Website.AdministratorsSystemRoleNumber". But I can't do that in
    web.config. And if I can't do that, then how can I control the access?

    I do not want to add another attribute (i.e. user-specified role name,
    etc..) to my security roles table. I just want to figure out how to
    use what we already have, which is one table with two attributes: int
    RoleId and nvarchar(25) Name.

    Any help is appreciated.
    JP
     
    Joey, Aug 8, 2007
    #1
    1. Advertisements

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. john smith
    Replies:
    0
    Views:
    533
    john smith
    Jan 6, 2004
  2. Natan

    web.config and location...

    Natan, Apr 15, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    809
    Curt_C [MVP]
    Apr 15, 2004
  3. mike

    web.config location

    mike, May 12, 2004, in forum: ASP .Net
    Replies:
    10
    Views:
    1,252
  4. Patrick Olurotimi Ige

    Web.Config (location path=)Question

    Patrick Olurotimi Ige, Apr 4, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    52,670
    grchuah
    Nov 5, 2006
  5. Patrick Olurotimi Ige

    location path in Web.config

    Patrick Olurotimi Ige, May 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,175
    Brock Allen
    May 12, 2005
  6. Bob
    Replies:
    1
    Views:
    752
    =?Utf-8?B?SmFzb24gTCBMaW5k?=
    Jul 13, 2005
  7. Benny Ng
    Replies:
    9
    Views:
    10,974
    Benny Ng
    Oct 13, 2005
  8. CSharpner
    Replies:
    0
    Views:
    1,427
    CSharpner
    Apr 9, 2007
Loading...