Forms Authentication Problem in .Net 1.1

  • Thread starter Thread starter Hugh McLaughlin
  • Start date Start date
H

Hugh McLaughlin

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
 
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.


--------------------
 
Back
Top