dynamically allowing anonymous users to web pages???

Discussion in 'ASP .Net Security' started by Pedro, Sep 5, 2003.

  1. Pedro

    Pedro Guest

    I have a web application that has a custom HttpHandler that has the
    following mapping

    http://myhost/mywebapp/site/page.aspx to
    http://myhost/mywebapp/page.aspx?id=site

    All pages have a predefined layout based on the site that is handled
    by a
    common base class.
    I use forms authentication that denies all anonymous acces

    <authorization>
    <deny users="?" />
    </authorization>

    My problem is that each site has a login page and a register page.
    When an anonymous users try to access a page, it gets redirected to
    the login page.
    I want to make an exception. I want that when an anonymous user tries
    to access the register page (registers.aspx), it should be able to do
    it.
    I know this can be done in the web.config file:

    <location path="site1/register.aspx">
    <system.web>
    <authorization>
    <allow users="?" />
    </authorization>
    </system.web>
    </location>

    <location path="site2/register.aspx">
    <system.web>
    <authorization>
    <allow users="?" />
    </authorization>
    </system.web>
    </location>

    <location path="site3/register.aspx">
    <system.web>
    <authorization>
    <allow users="?" />
    </authorization>
    </system.web>
    </location>

    ....

    but what i really want is not having to add a new entry to the
    webconfig when i add a new site (maybe using global.asax
    Authenticaticate event) but still using Forms authentication.

    Is this possible? if so, how?
    Thanks a lot!
     
    Pedro, Sep 5, 2003
    #1
    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. darrel
    Replies:
    0
    Views:
    317
    darrel
    Mar 27, 2006
  2. =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=

    Allowing users to edit a page

    =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    361
    =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=
    Oct 6, 2006
  3. Replies:
    1
    Views:
    321
  4. =?Utf-8?B?RGFuaWVs?=
    Replies:
    0
    Views:
    387
    =?Utf-8?B?RGFuaWVs?=
    Mar 1, 2007
  5. OhioSteve

    allowing users to change data in a datagrid

    OhioSteve, Sep 23, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    100
    OhioSteve
    Sep 23, 2004
Loading...

Share This Page