You should enable forms authentication in your root web.config (root of you
application, that is). For the subdirectory, you should then set the authorization
to not allow anonymous users. I presume the rest of the site is accessible
to anonymous users?
Here are the docs for configuring forms authentication:
http://msdn.microsoft.com/library/de...gngrfforms.asp
And here's how you'd set the authorization:
http://msdn.microsoft.com/library/de...asp?frame=true
Now since you're looking to control authorization on a subdirectory, the
authorization could go into an independant web.config in the child directory
you want to contol access to.
-Brock
DevelopMentor
http://staff.develop.com/ballen Hi guys
Ok, I have a website which has an "Artists Only" section, for which
you have to login for. This section is contained within its own
directory on the server "/aonly".
I want to make people login before they can access this directory,
with a User control on each page for logging in. I'd like to use Forms
auth and sql server (i know how to check that against the entered
details).
I also want a login.aspx page so that if their session expires, it's
easy to log back in.
Question is.. how do I create the forms auth and make it protect the
"/aonly" directory, and can I make the user control authenticate the
user, and then forward to the protected directory?
HOpe that makes sense!
Cheers
Dan