REPOST: Forms authentication in multiple folders

Discussion in 'ASP .Net' started by Harley, Nov 25, 2003.

  1. Harley

    Harley Guest

    i have an application that uses forms security to restrict access to a
    specific folder. now i need to secure another folder, in the same root, but
    redirect those users to another login. imagine, one folder for managers,
    another for assistants. no shared options between them, so dont try to
    suggest profiles =)

    the current configuration uses a web.config file on the root folder with
    this structure:

    <configuration>
    <system.web>
    ..
    ..
    ..
    <authentication mode="Forms">
    <forms name="InterMedia.PaymentsMerchantLogin"
    path="/"
    loginUrl="manager/login.aspx"
    protection="All"
    timeout="10">
    </forms>
    </authentication>
    <identity impersonate = "true"/>
    <authorization>
    <allow users="*" />
    </authorization>
    ..
    ..
    ..
    </system.web>
    <location path="manager">
    <system.web>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web>
    </location>
    ..
    ..
    ..
    </configuration>

    this redirects users to manager/login.aspx to all users trying to conect to
    the /mananger folder.

    now i need to secure another directory. i want to redirect users conecting
    to /affiliates to affiliates/login.aspx.

    if i use a different <location> section i get an
    error.

    what should i do?
     
    Harley, Nov 25, 2003
    #1
    1. Advertising

  2. "Harley" <harleyobrien%40hotmail.com> wrote in message
    news:...
    > i have an application that uses forms security to restrict access to a
    > specific folder. now i need to secure another folder, in the same root,

    but
    > redirect those users to another login. imagine, one folder for managers,
    > another for assistants. no shared options between them, so dont try to
    > suggest profiles =)
    >
    > the current configuration uses a web.config file on the root folder with
    > this structure:
    >
    > <configuration>
    > <system.web>
    > .
    > .
    > .
    > <authentication mode="Forms">
    > <forms name="InterMedia.PaymentsMerchantLogin"
    > path="/"
    > loginUrl="manager/login.aspx"
    > protection="All"
    > timeout="10">
    > </forms>
    > </authentication>
    > <identity impersonate = "true"/>
    > <authorization>
    > <allow users="*" />
    > </authorization>
    > .
    > .
    > .
    > </system.web>
    > <location path="manager">
    > <system.web>
    > <authorization>
    > <deny users="?" />
    > </authorization>
    > </system.web>
    > </location>
    > .
    > .
    > .
    > </configuration>
    >
    > this redirects users to manager/login.aspx to all users trying to conect

    to
    > the /mananger folder.
    >
    > now i need to secure another directory. i want to redirect users conecting
    > to /affiliates to affiliates/login.aspx.
    >
    > if i use a different <location> section i get an
    > error.
    >
    > what should i do?


    You should either use two separate web applications, or you should use the
    same login page for both kinds of users.
    --
    John Saunders
    John.Saunders at SurfControl.com
     
    John Saunders, Nov 25, 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. Jurjen de Groot
    Replies:
    0
    Views:
    424
    Jurjen de Groot
    Jan 30, 2004
  2. Jerry Morton
    Replies:
    0
    Views:
    449
    Jerry Morton
    Oct 10, 2004
  3. lecnac
    Replies:
    1
    Views:
    3,784
    Jeff Dillon
    Apr 24, 2006
  4. Eric
    Replies:
    2
    Views:
    556
  5. Tim_Mac

    REPOST: bug in Forms Authentication

    Tim_Mac, Nov 12, 2008, in forum: ASP .Net Security
    Replies:
    0
    Views:
    709
    Tim_Mac
    Nov 12, 2008
Loading...

Share This Page