Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Password protect/Forms authentication method

Reply
Thread Tools

Password protect/Forms authentication method

 
 
sunniyeow@gmail.com
Guest
Posts: n/a
 
      09-10-2005
Hi, My question is regarding password protecting 2 different folders
inside a single virtual directory using forms authentication method.
Easier if I illustrate things out...

- <authentication mode="Forms">
- Virtual Directory aka Top Level Root = /mysite
- Inside /mysite I have 2 sub-folders which I want to password protect
= /adminonly and /memberonly
- /adminonly is assigned to a single Admin user with a hard-coded pair
of username and password
- /memberonly username and password values are taken from a database,
therefore are dynamic
- I have 2 separate login pages called
/mysite/adminonly/adminlogin.aspx and /mysite/memberlogin.aspx

I have no problems getting things to work for each individual folder
(therefore my programming codes are correct) BUT I cannot get it to
work with both sub-folders at the same time under the same virtual
directory. I am getting very confused with my web.config,
<authorization>, <location path="adminonly">, <location
path="memberonly">, etc. settings.

Please help clear my confusion. Thanks.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UmFrZXNoIFJhamFu?=
Guest
Posts: n/a
 
      09-10-2005
Hi Sunni,

What exactly did you mean "BUT I cannot get it to
work with both sub-folders at the same time under the same virtual
directory."?

One more question: was there any reason to have used a separate login page
for members and admins?

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/



"(E-Mail Removed)" wrote:

> Hi, My question is regarding password protecting 2 different folders
> inside a single virtual directory using forms authentication method.
> Easier if I illustrate things out...
>
> - <authentication mode="Forms">
> - Virtual Directory aka Top Level Root = /mysite
> - Inside /mysite I have 2 sub-folders which I want to password protect
> = /adminonly and /memberonly
> - /adminonly is assigned to a single Admin user with a hard-coded pair
> of username and password
> - /memberonly username and password values are taken from a database,
> therefore are dynamic
> - I have 2 separate login pages called
> /mysite/adminonly/adminlogin.aspx and /mysite/memberlogin.aspx
>
> I have no problems getting things to work for each individual folder
> (therefore my programming codes are correct) BUT I cannot get it to
> work with both sub-folders at the same time under the same virtual
> directory. I am getting very confused with my web.config,
> <authorization>, <location path="adminonly">, <location
> path="memberonly">, etc. settings.
>
> Please help clear my confusion. Thanks.
>
>

 
Reply With Quote
 
 
 
 
sunniyeow@gmail.com
Guest
Posts: n/a
 
      09-10-2005
Hi,

What I mean by that is...IF I want to only password protect 1
sub-folder, my programming codes work perfectly. BUT I am not able to
password protect 2 sub-folders at the same time.

Regarding the separate login page - no reason other than my own
preference. But I have indeed thought about this issue too. Maybe if I
use only 1 single login page, things will work for me?

Thanks.

 
Reply With Quote
 
=?Utf-8?B?UmFrZXNoIFJhamFu?=
Guest
Posts: n/a
 
      09-12-2005
Hi,

You need have only one login page.

Depending upon the security roles you have specified, you could prevent
admin from accessing membersonly area etc.

Let me know if you need more assistance.

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/



"(E-Mail Removed)" wrote:

> Hi,
>
> What I mean by that is...IF I want to only password protect 1
> sub-folder, my programming codes work perfectly. BUT I am not able to
> password protect 2 sub-folders at the same time.
>
> Regarding the separate login page - no reason other than my own
> preference. But I have indeed thought about this issue too. Maybe if I
> use only 1 single login page, things will work for me?
>
> Thanks.
>
>

 
Reply With Quote
 
sunniyeow@gmail.com
Guest
Posts: n/a
 
      09-14-2005
Hi Rakesh,

Looks like we're heading in the right direction. Ok on only 1 single
login page.
I understand what you mean by assigning different security roles but my
..Net skills isn't up to par to pulling that off.

Yes, it would be great if you can provide me with a sample web.config
file with the security roles concept based on my requirements.

Thanks Rakesh for your time.
-Sun Ni-

 
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
Change a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 1 01-16-2009 02:56 PM
Changing a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 2 01-16-2009 02:08 PM
method def in method vs method def in block Kyung won Cheon Ruby 0 11-21-2008 08:48 AM
I saved password into the database with "binary" data type from GetByte method. How can I to compare the password that between database and transfered from the page? Benny Ng ASP .Net 3 01-25-2006 06:49 AM
Adding a password to Mozilla Password Manager Dirk Firefox 4 10-28-2003 10:00 PM



Advertisments