Forms Authentication Question

R

Rob

I would like to use Forms Authentication on my website but only certain
pages need to be authenticated. In other word, users can browse many
pages on the site without having to log in but when the access certain
pages, they have to be authenticated. Can I use Forms Authentication in
this scenario or is Forms Authentication for the entire site?

Thanks

Rob
 
D

Dominick Baier [DevelopMentor]

Hello Rob,

add a location element for the pages that should be authenticated

like

<location path="page.aspx">
<system.web>
< authorization>
<allow roles="Role" />
<deny users="*" />
</authorization>
</system.web>
</location>

or put all page that need auth together in one directory and specifiy the
directory name in the location element.
 
R

Rob

Thanks Dominick,

I have a lot of files so I think putting them in a separate folder is
the way to go.

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top