If your sub directories are separate applications and not part of the main application, this is the expected behavior. The forms authentication is trying authenticate for the current application.
What you could do is write a little httpModule in the main app that looks for any request to login.aspx, intercepts it and redirects it to the login.aspx in the main app. A slightly quicker hack would be to create login.aspx pages in the sub apps that simply redirect to the login.aspx in the main app. --- In [email protected], "Falls, Travis D (HTSC, CASD)" <[EMAIL PROTECTED]> wrote: > Hi Bob and Dean, > I tried this /login.aspx and it still tries to find > /RAFTAdmin2/Admin/FileWatcher/login.aspx instead of kicking back to > /RAFTAdmin2/login.aspx. I will keep searching. Thanks for the thoughts. > > Travis D. Falls | Consultant RAFT.Net IT | 860.547.4070 | > [EMAIL PROTECTED] > > > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] Behalf Of Bob Filipiak > Sent: Tuesday, August 23, 2005 1:24 PM > To: [email protected] > Subject: Re: [AspNetAnyQuestionIsOk] Forms Authentication > > > Try: > <forms name="ASPXCOOKIERAFTAdmin" path="/" > loginUrl="/login.aspx" protection="All" timeout="60"> > > > ----- Original Message ----- > From: "Falls, Travis D (HTSC, CASD)" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Tuesday, August 23, 2005 12:59 PM > Subject: [AspNetAnyQuestionIsOk] Forms Authentication > > > >I am trying to use forms auth to secure a directory below my root. The > >root > > directory is open for all and this is where my login.aspx form resides. > > Under root I have Admin/FileWatcher, Admin/LogViewer, and Admin/Password > > all > > of which I want secure with the only allowed user listed in the > > credentials > > section. When I hit the secured page it tries to find the login page in > > the > > secured directory. How do I tell it to back up to find it in the root? I > > tried ../../login.aspx but that isn't allowed. > > > > <?xml version="1.0" encoding="utf-8" ?> > > <configuration> > > <appSettings></appSettings> > > <system.web> > > <compilation defaultLanguage="c#" debug="true" /> > > <customErrors mode="RemoteOnly" defaultRedirect="error.aspx" > > /> > > <authentication mode="Forms"> > > <forms name="ASPXCOOKIERAFTAdmin" path="/" > > loginUrl="login.aspx" protection="All" timeout="60"> > > <credentials passwordFormat="Clear"> > > <user name="raftnet" > > password="PASSWORD" /> <!--this is in MD5 but made it clear for simplisity > > --> > > </credentials> > > </forms> > > </authentication> > > <authorization> > > <allow users="*" /> > > </authorization> > > <trace enabled="false" requestLimit="100" pageOutput="true" > > traceMode="SortByTime" localOnly="true" /> > > <sessionState mode="InProc" > > stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data > > source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" > > /> > > <globalization requestEncoding="utf-8" > > responseEncoding="utf-8" /> > > </system.web> > > <location path="Admin"> > > <system.web> > > <authorization> > > <deny users="*" /> > > <allow users="raftnet" /> > > </authorization> > > </system.web> > > </location> > > </configuration> > > > > > > ************************************************************************* > > PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is > > for the exclusive use of addressee and may contain proprietary, > > confidential and/or privileged information. If you are not the intended > > recipient, any use, copying, disclosure, dissemination or distribution is > > strictly prohibited. If you are not the intended recipient, please notify > > the sender immediately by return e-mail, delete this communication and > > destroy all copies. > > ************************************************************************* > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hudejjg/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124826862/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992 ">Fair play? Video games influencing politics. Click and talk back!</a>.</font> --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
