Hi Hugh,
I hope I understand your question correctly. You want to have a web site
that requires forms authentication for some subfolders, but not for others.
I accomplished this with a "location" section in my web.config file. First,
I setup forms authentication for the whole site and verified that it was
working. Then I changed the web.config to allow anonymous users. Then I
added a location section which denied anonymous users to just the pages
that I wanted to protect.
Here is my location section which forces forms authentication for one page.
<location path="Deny.aspx">
<system.web>
<authorization>
<deny users ="?" />
</authorization>
</system.web>
</location>
Does this answer your question?
Thank you, Mike
Microsoft, ASP.NET
Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "Hugh McLaughlin" <hu**@kmcnetwork.com>
Sender: "Hugh McLaughlin" <hu**@kmcnetwork.com>
Subject: Forms Authentication Problem in .Net 1.1
Date: Sun, 14 Sep 2003 16:16:12 -0700
Lines: 11
Message-ID: <03****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcN7FjBj42UZ8k0nTvyjZPDWq4XJ/g==
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa07.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.general:108139
NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.general
Hello Everyone and thanks for your help in advance. I
recently installed Visual Studio 2003 and .Net 1.1. I
then converted one of my applications to 2003. However,
I am running into a probelm with forms authenticaion. I
have set up certain subfolders that are proected and
should be redirected to a login page. However, when I
try to access the protected pages, I receive an HTTP 403
error, you are not authorized to view this page, rather
than a redirection to the login page. None of the code
has been changed, so I am not sure why this is
happening. Any help would be greatly appreciated