Beginners question: Form based authentication

Discussion in 'ASP .Net Security' started by Oliver Kharraz, May 23, 2004.

  1. Hello,

    the following question may be trivial, but after scrolling documentations on
    my screen for hours I'd absolutely appreciate your help:

    I want to have two kind of pages on my site: the ones everyone can access
    (allow users="*" in the web.config) and those that require forms based
    authentication (allow users="?" in the web config). How do I set it up so
    that the IIS knows which page uses which setting? In the Visual Basic. net
    documentation, it says it can be done page specific, but does not give an
    example.

    Thank you so much,

    Oliver
     
    Oliver Kharraz, May 23, 2004
    #1
    1. Advertising

  2. Oliver Kharraz

    Eric Marvets Guest

    Choose whichever section will have more pages. For that section, set up the
    config file as you normally would. After the normal '</system.web>' add the
    following for each page:

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

    In there, you can specify all the <system.web> settings again for that page.

    It is better to configure this by directory, as setting up a <location> for
    a number of pages can be difficult to maintain, vs. one web.config file per
    subdirectory.

    --
    Eric Marvets
    Principal Consultant

    the bang project

    <shameless self promotion>

    Email for Information on Our Architecture and
    Mentoring Services

    </shameless self promotion>
     
    Eric Marvets, May 23, 2004
    #2
    1. Advertising

  3. Works perfectly!

    Thank you,

    Oliver

    "Eric Marvets" <> wrote in message
    news:uP%...
    > Choose whichever section will have more pages. For that section, set up

    the
    > config file as you normally would. After the normal '</system.web>' add

    the
    > following for each page:
    >
    > <location path="Logon.aspx">
    > <system.web>
    > <authorization>
    > <allow users="?"/>
    > </authorization>
    > </system.web>
    > </location>
    >
    > In there, you can specify all the <system.web> settings again for that

    page.
    >
    > It is better to configure this by directory, as setting up a <location>

    for
    > a number of pages can be difficult to maintain, vs. one web.config file

    per
    > subdirectory.
    >
    > --
    > Eric Marvets
    > Principal Consultant
    >
    > the bang project
    >
    > <shameless self promotion>
    >
    > Email for Information on Our Architecture and
    > Mentoring Services
    >
    > </shameless self promotion>
    >
    >
     
    Oliver Kharraz, May 23, 2004
    #3
    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. Dom
    Replies:
    0
    Views:
    473
  2. Dom
    Replies:
    0
    Views:
    518
  3. Max
    Replies:
    2
    Views:
    1,122
  4. M2Web

    Form based authentication question

    M2Web, Jul 9, 2003, in forum: ASP .Net Security
    Replies:
    1
    Views:
    141
    Colin Turner
    Jul 9, 2003
  5. kitchai yong via .NET 247

    authenticate win32 form client with form based authentication web services

    kitchai yong via .NET 247, May 13, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    236
    Jan Tielens
    May 13, 2004
Loading...

Share This Page