How do i force forms authentication

My web app is built in ASP .NET 3.5 [C#]. I want to force users to authenticate using forms authentication. When a user initially comes to any number of pages within a subset of pages within my site, let's say 5 pages total, i want then to have to authenticate. But only once, for any page within that subset of five pages. So that when once they authenticate once, then are free to go to any page in the site, including the other 4 pages without having to authenticate again. How do I achieve this. I'm somewhat familiar with how this is supposed to work, but the details of what i need to do / put in place / configure are escaping me right now. I need to know what my web.config should look like; what code i need to right for my login.aspx page and any other minimum coding, or settings that i will need in place to accomplish this. Any help would be appreciated. I've looked into links / articles but they seem to be more confusing than anything, i may need more of a step by step approach to this thing...
Michael SterlingWeb Applications DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael SterlingWeb Applications DeveloperAuthor Commented:
additionally, if my web application will live in a "web farm" environment, is forms authentication the best way to go? or, should i simply force the user to authenticate on each page that i need them to? i may post this question separately....
Forms Authentication is fine - you just need to set a FormsAuthenticationTicket cookie.  The "easiest" way is to use the built-in membership provider - but it does has a steep initial learning curve.

if you are talking about internal users on a domain, then use windows authentication rather than forms authentication.

Or, on your login page, simply set a cookie Reponse.Cookies["authenticated"].Value = true;
then check if the cookie is present on page_load on each page.  (this is essentially what the membership provider does, just with a whole bunch more security).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael SterlingWeb Applications DeveloperAuthor Commented:
still workin on this...
Michael SterlingWeb Applications DeveloperAuthor Commented:
thank you for your help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.