Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Security / June 2004

Tip: Looking for answers? Try searching our database.

Forms Authentication for particular folder

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
VIC - 28 Jun 2004 08:10 GMT
Hi,

I'm working on a webapplication, most part is for anonymous access, but for
one part login is needed. All the files after login are in one particual
folder: "/login".

Usernames and passwords are stored in a tabel on SQL Server.
The loginpage and Web.config are  in the root of the web.

I've tried several things but I don't get it work correctly.
My code of checking against the table works correctly, I'm struggling with
Web.config.

The authentication section of Web.config is like:

<authentication mode="Forms">
 <forms name="justaname"
        path="/"
        loginUrl="login.aspx"
        protection="All"
        timeout="20">
 </forms>
</authentication>

All I want to manage is to allow anonymous acces for the whole website,
except the content of the subfolder "/login".
Any help is appreciated, thanks!

VicWare
Email: info@vicREMOVE-MEware (spamblock)
Ken Schaefer - 28 Jun 2004 09:12 GMT
You need to create a new <location> in your web.config and point it to your
folder. Configure forms auth for that location only

Cheers
Ken

: Hi,
:
[quoted text clipped - 26 lines]
: VicWare
: Email: info@vicREMOVE-MEware (spamblock)
ranganh - 28 Jun 2004 10:03 GMT
Dear VIC,

You need to add the following code to your web.config file.

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

Hope it helps.

Thanks.

> Hi,
>
[quoted text clipped - 26 lines]
> VicWare
> Email: info@vicREMOVE-MEware (spamblock)
VicWare - 28 Jun 2004 20:09 GMT
That works!
Thanks a lot!

Vic

> Hi,
>
[quoted text clipped - 26 lines]
> VicWare
> Email: info@vicREMOVE-MEware (spamblock)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.