location authorization

Discussion in 'ASP .Net Security' started by TdarTdar, Nov 12, 2005.

  1. TdarTdar

    TdarTdar Guest

    Hello,
    using the location stuff, do i have to define this for each sub directory in
    this directory also or is there something i can do to include the
    subdirectories in the=:


    <location path="SITE_ADMIN" >
    <system.web>
    <authorization>
    <allow users="SADMIN" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>


    would i have to this:
    <location path="SITE_ADMIN/GIS" >
    <system.web>
    <authorization>
    <allow users="SADMIN" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    <location path="SITE_ADMIN/GIS/CITY" >
    <system.web>
    <authorization>
    <allow users="SADMIN" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    for every directory i have under that directory, because when a loged in
    user browses a page that is in that subdirectory they get the log in screen
    like they dont have premission to view but it is in the SITE_ADMIN and they
    are in the SADMIN role.

    ?
    TdarTdar, Nov 12, 2005
    #1
    1. Advertising

  2. TdarTdar

    [MSFT] Guest

    Hello,

    You don't need to define it for each sub diretocy, only the top one is
    enough:

    <location path="SITE_ADMIN" >
    <system.web>
    <authorization>
    <allow users="SADMIN" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    Luke
    [MSFT], Nov 14, 2005
    #2
    1. Advertising

  3. TdarTdar

    TdarTdar Guest

    Then why when a user that is in the sadmin group calls a page in that area it
    flips me to the login.aspx

    "[MSFT]" wrote:

    > Hello,
    >
    > You don't need to define it for each sub diretocy, only the top one is
    > enough:
    >
    > <location path="SITE_ADMIN" >
    > <system.web>
    > <authorization>
    > <allow users="SADMIN" />
    > <deny users="*" />
    > </authorization>
    > </system.web>
    > </location>
    >
    > Luke
    >
    >
    TdarTdar, Nov 14, 2005
    #3
  4. TdarTdar

    TdarTdar Guest

    also I should mention the SP that you have in SQL for the adding new roles
    was missing the roleid = newid() in the sp, I was not able to add a new role
    until i fixed this on the sql server 2k. I will post sp tomorrow so you can
    check it out for everyone else..

    "[MSFT]" wrote:

    > Hello,
    >
    > You don't need to define it for each sub diretocy, only the top one is
    > enough:
    >
    > <location path="SITE_ADMIN" >
    > <system.web>
    > <authorization>
    > <allow users="SADMIN" />
    > <deny users="*" />
    > </authorization>
    > </system.web>
    > </location>
    >
    > Luke
    >
    >
    TdarTdar, Nov 14, 2005
    #4
  5. TdarTdar

    [MSFT] Guest

    I missed an issue in my last message:

    <location path="SITE_ADMIN" >
    <system.web>
    <authorization>
    <allow users="SADMIN" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>


    I think it should be:

    <allow roles="SADMIN" />

    Hope this help,

    Luke
    [MSFT], Nov 14, 2005
    #5
  6. TdarTdar

    TdarTdar Guest

    ah.. damn why is it always the small things that cause big problems...


    "[MSFT]" wrote:

    > I missed an issue in my last message:
    >
    > <location path="SITE_ADMIN" >
    > <system.web>
    > <authorization>
    > <allow users="SADMIN" />
    > <deny users="*" />
    > </authorization>
    > </system.web>
    > </location>
    >
    >
    > I think it should be:
    >
    > <allow roles="SADMIN" />
    >
    > Hope this help,
    >
    > Luke
    >
    >
    TdarTdar, Nov 14, 2005
    #6
  7. TdarTdar

    [MSFT] Guest

    :) I am glad to hear that we found the problem.

    Luke
    [MSFT], Nov 15, 2005
    #7
    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. Chuck
    Replies:
    0
    Views:
    226
    Chuck
    Sep 14, 2009
  2. Chuck
    Replies:
    0
    Views:
    228
    Chuck
    Sep 16, 2009
  3. Chuck
    Replies:
    0
    Views:
    261
    Chuck
    Sep 16, 2009
  4. Chuck
    Replies:
    5
    Views:
    1,112
    Allen Chen [MSFT]
    Sep 22, 2009
  5. SeanRW
    Replies:
    1
    Views:
    348
    Dominick Baier [DevelopMentor]
    May 25, 2006
Loading...

Share This Page