Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Forms Authentication for particular folder

Reply
Thread Tools

Forms Authentication for particular folder

 
 
VIC
Guest
Posts: n/a
 
      06-28-2004
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)


 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      06-28-2004
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


"VIC" <(E-Mail Removed)> wrote in message
news:40dfc41b$0$10303$(E-Mail Removed)...
: 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)
:
:


 
Reply With Quote
 
 
 
 
ranganh
Guest
Posts: n/a
 
      06-28-2004
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.


"VIC" wrote:

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

 
Reply With Quote
 
VicWare
Guest
Posts: n/a
 
      06-28-2004
That works!
Thanks a lot!

Vic

"VIC" <(E-Mail Removed)> schreef in bericht
news:40dfc41b$0$10303$(E-Mail Removed)...
> 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)
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I allow access to axd files in a protected folder (forms authentication) Alan Silver ASP .Net 0 02-27-2008 09:06 AM
Best practices for using forms authentication and security in a hosted env (was: Re: Using a Forms authentication in a shared hosting environment) JEFF ASP .Net 1 11-12-2007 07:00 PM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
cassini, forms authentication and application folder [2.0] Wiktor Zychla [C# MVP] ASP .Net 2 11-21-2005 03:37 PM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric ASP .Net 2 02-13-2004 02:14 PM



Advertisments