web.config and authentication in sub-dirs

From: Jonah Olsson (jonah@generationsoftware.se)
Date: 12/15/02


From: "Jonah Olsson" <jonah@generationsoftware.se>
Date: Sun, 15 Dec 2002 00:34:15 +0100


Hi,

I know this subject has been brought up a number of times, but after doing
several searches of the newsgroups using Google to find an answer, I still
haven't found it...

I'm in need of two separate login pages for two different sub-dirs. Here's a
brief site layout:

Root (no login required / login page for Press)
- Admin (login required, has it's own login page)
- Press (login required, go to root for login page)
...

The root has an web.config file which looks like this:

<configuration>
 <system.web>
        <customErrors mode="Off"/>
  <globalization
           culture="sv-SE"
           uiCulture="sv-SE"
        />

  <authentication mode="Forms">
   <forms name="xxxAuth"
    loginUrl="/xxx_com/default.aspx"
                protection="All"
                timeout="20" />
        </authentication>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>

 <location path="press">
  <system.web>
   <authorization>
    <deny users="?" />
   </authorization>
  </system.web>
 </location>

 <location path="admin">
  <system.web>
   <authorization>
    <deny users="?" />
   </authorization>
  </system.web>
 </location>

</configuration>

But how can I add like;

   <forms name="xxxAdminAuth"
    loginUrl="/xxx_com/admin/login.aspx"
                protection="All"
                timeout="20" />

to get separate login the the admin pages? Another web.config in the
sub-dirs just returns the famous MachineToApplication error..

Thanks for any kind of help

/Jonah



Relevant Pages

  • Re: Checking IsAuthenticated for new ASP.NET session
    ... again...my issue is that I do not want to redirect a user to the login ... force authentication by denying authorization to index.aspx for all ... lets say you are an admin user and this is your ... but all the pages now have 5 javascript menus. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • SUMARY: Cant login as root
    ... As a result, i was not able to log in as root, neither create a new ... Asunto: RE: Can't login as root ... > console. ... > If we log as any other user everythig is ok, but we cannot either do su-. ...
    (Tru64-UNIX-Managers)
  • RE: Urgent help needed with Login problems after installation of FC1
    ... symptom trying to su back to root. ... After another minimal install, I was able to add my user and su to it and su ... I was unable to boot using the boot floppy. ... I did a minimal install and was able to login as root, ...
    (Fedora)
  • Re: BSM, SSH, and Session ID
    ... Are you logging in as root through ssh or is that just the way it is ... Sun SSH/OpenSSH should fork off before the login because the sshd ... It should always be a different session, ...
    (Focus-SUN)
  • Re: Urgent help needed with Login problems after installation of FC1
    ... login would do anything but loop back to the Login: ... >From Gnome desktop, I was able to logout user, login root, over and ... Am able to boot from floppy. ... >After another minimal install, I was able to add my user and su to ...
    (Fedora)