Role based security across sub directories

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Role based security across sub directories

    Take the following directory structure:

    AppRoot (configured as a IIS Application)
    -> bin
    -> dirA
    -> dirB
    -> dirC
    login.aspx
    web.config

    Ok, what I want to do is controll access to everything in the appRoot
    and then, based on a role, allow access to dirA, B, C etc. I am
    currently using forms based authentication which authenticates via a
    DB. Once authenticated I retrieve and create the principal and
    overwrite the original. The roles are then kept up via a http handler
    who's code is in the bin.

    Question 1: Do all the sub directories have to be configured in IIS as
    applications? It would seem like there would be a way to indicate that
    the sub directories are a part of the App so that configuration
    settings in the web.config would apply to all. If that is possible,
    then why would the subs need to have application entry points in IIS?
    When I try to use a location element in the root web.config to enable
    the http handler that keeps up with roles, I get the error that
    generally says configure dirA as a IIS application. If I do make them
    apps in IIS, won't I run into AppDomain boundaries when I try to do
    things across directories?

    Question 2: I have my http handler code in a separate dll in the bin.
    I would like to use the <location> element in the root web.config to
    apply the handler and role restrictions on the sub directories. If the
    handler code is in the root/bin, can I specify a path in the root
    web.config <location> elements that point to it? Or would the only way
    to do this be to put the handler code in the GAC so everything could
    see it?
    Fun stuff.

    Thanks ahead. Just a little confused here.
    FeatureRich Guest

  2. Similar Questions and Discussions

    1. Do I need Role Based Security
      Corinna, In your example i'd say its not necessary to use role-based security. Since there's only 1 level of membership as you say then all I...
    2. securing directories with role-based forms authentication
      I have an ASP.NET application that uses forms authentication. I rolled my own CustomPrincipal class for role-based authentication, and wired the...
    3. Reg Role BAsed security..
      Hi All.. Can any body detail out the basic diff/advatages/disadvantage over acheiving the role based security and the same thing in case of...
    4. Help please with Role based security not working.
      Hello All, I am trying to use the .Net built in role based security. It is not working. The web config has the following; <authorization> ...
  3. #2

    Default RE: Role based security across sub directories

    Hi FeatureRich,
    Try reading through :-
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306238#3[/url]
    Hope it helps
    Patrick


    "FeatureRich" wrote:
    > Take the following directory structure:
    >
    > AppRoot (configured as a IIS Application)
    > -> bin
    > -> dirA
    > -> dirB
    > -> dirC
    > login.aspx
    > web.config
    >
    > Ok, what I want to do is controll access to everything in the appRoot
    > and then, based on a role, allow access to dirA, B, C etc. I am
    > currently using forms based authentication which authenticates via a
    > DB. Once authenticated I retrieve and create the principal and
    > overwrite the original. The roles are then kept up via a http handler
    > who's code is in the bin.
    >
    > Question 1: Do all the sub directories have to be configured in IIS as
    > applications? It would seem like there would be a way to indicate that
    > the sub directories are a part of the App so that configuration
    > settings in the web.config would apply to all. If that is possible,
    > then why would the subs need to have application entry points in IIS?
    > When I try to use a location element in the root web.config to enable
    > the http handler that keeps up with roles, I get the error that
    > generally says configure dirA as a IIS application. If I do make them
    > apps in IIS, won't I run into AppDomain boundaries when I try to do
    > things across directories?
    >
    > Question 2: I have my http handler code in a separate dll in the bin.
    > I would like to use the <location> element in the root web.config to
    > apply the handler and role restrictions on the sub directories. If the
    > handler code is in the root/bin, can I specify a path in the root
    > web.config <location> elements that point to it? Or would the only way
    > to do this be to put the handler code in the GAC so everything could
    > see it?
    > Fun stuff.
    >
    > Thanks ahead. Just a little confused here.
    >
    Patrick.O.Ige Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139