Is it possiable to create an access rule for a file?

Discussion in 'ASP .Net' started by =?Utf-8?B?QmVha2Vy?=, Mar 20, 2007.

  1. I vaguely recall that ASP.NET 1.1 had a way to specify specific pages and
    associate required roles to access those pages.. Is there something similar
    to that in ASP.NET 2.0? IE, I would like to say that all pages are open,
    except x.aspx, y.aspx, and z.aspx. These pages require roles, a,b,c.. Looking
    at the allow element, there is no page or related property..??
    Sorry if this was already answered..
    Thanks for the help..
    =?Utf-8?B?QmVha2Vy?=, Mar 20, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?QmVha2Vy?=

    Jeff T Guest

    On Mar 20, 3:52 pm, Beaker <> wrote:
    > I vaguely recall that ASP.NET 1.1 had a way to specify specific pages and
    > associate required roles to access those pages.. Is there something similar
    > to that in ASP.NET 2.0? IE, I would like to say that all pages are open,
    > except x.aspx, y.aspx, and z.aspx. These pages require roles, a,b,c.. Looking
    > at the allow element, there is no page or related property..??
    > Sorry if this was already answered..
    > Thanks for the help..


    In the web.config for a directory or the main one you can setup the
    <authorization> part to do what you need.

    If you want to restrict a certain page you need to put the
    authorization in a <location> section for that page or path.

    For example:

    <location path="x.aspx">
    <system.web>
    <authorization>
    <allow roles="a,b,c" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>
    Jeff T, Mar 20, 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. Raghu Raman

    Auto messages possiable ?

    Raghu Raman, Jan 11, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    344
    Raghu Raman
    Jan 12, 2005
  2. Raghuram

    Re: Is it possiable

    Raghuram, Aug 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    400
  3. Scott Phelps
    Replies:
    14
    Views:
    680
    jan V
    Sep 8, 2005
  4. Replies:
    0
    Views:
    1,356
  5. Jia Lu

    Many-to-many pattern possiable?

    Jia Lu, May 19, 2007, in forum: Python
    Replies:
    4
    Views:
    287
    Bruno Desthuilliers
    May 20, 2007
Loading...

Share This Page