Simple website with open and restricted area

Discussion in 'ASP .Net Security' started by Magnus Blomberg, Feb 20, 2006.

  1. Hi!

    I am trying to write a simple public web application (internet) where the
    root is public (anonymous) and where I have a subfolder called admin where a
    few aspx-pages should be restricted to one user.

    In dotnet 1.1 (or was it 2.0 beta) I had this funcionality using
    Authentication mode set to Windows. Isn't this possible for dotnet 2.0? I
    just want one login account to use the site, so I don't think I want to use
    forms authentication to set up a login page (or is this made in 30 minutes),
    and account administration page. Or could you add forms users via an
    existing interface?

    My current web.config in the admin subfolder looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
    <authorization>
    <allow users="MIKLA\MegaphoneAdmin" />
    <deny users="*" />
    </authorization>
    </system.web>
    </configuration>

    Could anyone help me to accomplish this?!?!?
    Regards Magnus
    Magnus Blomberg, Feb 20, 2006
    #1
    1. Advertising

  2. Magnus Blomberg

    MikeS Guest

    What is not working with this approach?
    MikeS, Feb 20, 2006
    #2
    1. Advertising

  3. Hello Magnus,

    the windows authentication approach just works as in 1.1: Set the
    authentication tag to "Windows", and enable Windows-Authentication and/or
    basic authentication in IIS.

    Greetings,
    Henning

    "Magnus Blomberg" <> wrote in message
    news:...
    > Hi!
    >
    > I am trying to write a simple public web application (internet) where the
    > root is public (anonymous) and where I have a subfolder called admin where
    > a
    > few aspx-pages should be restricted to one user.
    >
    > In dotnet 1.1 (or was it 2.0 beta) I had this funcionality using
    > Authentication mode set to Windows. Isn't this possible for dotnet 2.0? I
    > just want one login account to use the site, so I don't think I want to
    > use
    > forms authentication to set up a login page (or is this made in 30
    > minutes),
    > and account administration page. Or could you add forms users via an
    > existing interface?
    >
    > My current web.config in the admin subfolder looks like this:
    > <?xml version="1.0" encoding="utf-8"?>
    > <configuration
    > xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    > <system.web>
    > <authorization>
    > <allow users="MIKLA\MegaphoneAdmin" />
    > <deny users="*" />
    > </authorization>
    > </system.web>
    > </configuration>
    >
    > Could anyone help me to accomplish this?!?!?
    > Regards Magnus
    >
    >
    >
    Henning Krause [MVP], Feb 21, 2006
    #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. Magnus Blomberg

    Simple website with open and restricted area

    Magnus Blomberg, Feb 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,005
    Magnus Blomberg
    Feb 20, 2006
  2. Mark
    Replies:
    1
    Views:
    573
    Larry Barowski
    Jun 27, 2005
  3. hotadvice
    Replies:
    14
    Views:
    692
    hotadvice
    Oct 2, 2007
  4. Kausar Parveen
    Replies:
    4
    Views:
    240
    Kausar Parveen
    May 31, 2006
  5. Richard Silverstein
    Replies:
    0
    Views:
    158
    Richard Silverstein
    Sep 18, 2003
Loading...

Share This Page