Forms Authentication question: How to have some pages open and some requiring forms authentication

From: Eric (glorfindel02_at_hotmail.com)
Date: 02/13/04


Date: Thu, 12 Feb 2004 22:32:29 -0800

I am trying to build an app where the stuff in the root directory is open to
all, but anything under the Restricted directory requires you to login and I
want to use Forms to do it. I'm having trouble getting the web.config to
work properly.

First I tried to have a second web.config in the sub directory with
authentication and authorization set to forms, but it blew up.
Next, I tried to modify the root web.config in the following manner wanting
it to only force a login when trying to navigate into the sub directory but
it takes me to the login right away:
I thought setting the path to the sub directory would restrict it to pages
in the sub directory but it's not working.
<authentication mode="Forms" >

<forms loginUrl="FormsAuthenticated/login1.aspx" name="AuthCookie"
timeout="60" path="/FormsAuthenticated"></forms>

</authentication>

<authorization>

<deny users="?" />

<allow users="*" />

</authorization>



Relevant Pages

  • Re: Could not load type error
    ... Go into the IIS MMC and ... check the virtual directory settings for the sub directory. ... ASP.NET always looks in the bin directory for the ... >the root directory to the subdirectory, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Forms Authentication question: How to have some pages open and some requiring forms authenticat
    ... In your root web.config ... > authentication and authorization set to forms, ... > it to only force a login when trying to navigate into the sub directory ...
    (microsoft.public.dotnet.framework.aspnet)
  • About Web.config
    ... I have a web app that uses Forms auth in root Web.config, users must login ... to access asp.net resources. ... I want one of the sub directory can be ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: multiple file question
    ... I agree with Dominick that you'd better put all those help document ... pages(which does not requier user to login) in a sub directory so that you ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Help with the IIS Application Setting
    ... Thank you for yor response. ... yes I had a login application which I ... dragged into the sub directory under my site. ... both root and login. ...
    (microsoft.public.dotnet.framework.aspnet)