Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Password protect/Forms authentication method (http://www.velocityreviews.com/forums/t109598-password-protect-forms-authentication-method.html)

sunniyeow@gmail.com 09-10-2005 06:42 AM

Password protect/Forms authentication method
 
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.


=?Utf-8?B?UmFrZXNoIFJhamFu?= 09-10-2005 12:02 PM

RE: Password protect/Forms authentication method
 
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/



"sunniyeow@gmail.com" 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.
>
>


sunniyeow@gmail.com 09-10-2005 04:38 PM

Re: Password protect/Forms authentication method
 
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.


=?Utf-8?B?UmFrZXNoIFJhamFu?= 09-12-2005 05:36 AM

Re: Password protect/Forms authentication method
 
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/



"sunniyeow@gmail.com" 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.
>
>


sunniyeow@gmail.com 09-14-2005 08:05 PM

Re: Password protect/Forms authentication method
 
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-



All times are GMT. The time now is 12:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.