Forms Authentication and Login Pages

Discussion in 'ASP .Net' started by Dave, Jul 4, 2003.

  1. Dave

    Dave Guest

    Hi,

    I am creating a web application which have two different login areas. One
    for members and one for administrators. Currently, I am using forms
    authentication to validate the login for administrators as shown below. This
    works perfectly fine but I now need to add another login authentication for
    members which redirects them to a different login page if they are not
    authenticated. Does anyone know how I would add this to the web.config file?


    <configuration>
    <system.web>
    <authentication mode="Forms">
    <forms name="..admin" path="/" loginUrl="/admin/login.aspx"
    protection="All" timeout="30"/>
    </authentication>
    </system.web>
    <location path="admin/documents">
    <system.web>
    <authorization>
    <deny users="?"/>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>
    </configuration>


    Thanks,
    Dave
     
    Dave, Jul 4, 2003
    #1
    1. Advertising

  2. Dave

    David Waz... Guest

    Could use more info.... but

    If you have a separate web application, you can place the security
    information inside THAT applications Web.Config file, instead of trying to
    do double duty on a single app.

    If you are trying to class users as "admin" and "Normal", you can store that
    information in the encrypted cookie as the security value, and extract that
    value on page-load to verify authorization.


    "Dave" <> wrote in message
    news:bY8Na.248$...
    > Hi,
    >
    > I am creating a web application which have two different login areas. One
    > for members and one for administrators. Currently, I am using forms
    > authentication to validate the login for administrators as shown below.

    This
    > works perfectly fine but I now need to add another login authentication

    for
    > members which redirects them to a different login page if they are not
    > authenticated. Does anyone know how I would add this to the web.config

    file?
    >
    >
    > <configuration>
    > <system.web>
    > <authentication mode="Forms">
    > <forms name="..admin" path="/" loginUrl="/admin/login.aspx"
    > protection="All" timeout="30"/>
    > </authentication>
    > </system.web>
    > <location path="admin/documents">
    > <system.web>
    > <authorization>
    > <deny users="?"/>
    > <allow users="*"/>
    > </authorization>
    > </system.web>
    > </location>
    > </configuration>
    >
    >
    > Thanks,
    > Dave
    >
    >
    >
     
    David Waz..., Jul 4, 2003
    #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. Eric
    Replies:
    2
    Views:
    1,498
    Tommy
    Feb 13, 2004
  2. Leo Gagne

    Forms authentication and multiple login pages

    Leo Gagne, Dec 3, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    168
    Leo Gagne
    Dec 3, 2003
  3. Pascal Blanchard
    Replies:
    0
    Views:
    252
    Pascal Blanchard
    Aug 17, 2004
  4. Pascal Blanchard
    Replies:
    1
    Views:
    284
    Pascal Blanchard
    Aug 18, 2004
  5. Keltex
    Replies:
    1
    Views:
    406
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
Loading...

Share This Page