Thursday, March 29, 2012

Setting Page Access Priviledges

I need to set my website so that only people who have created an account and signed in can access certain pages. How do I set it up so that if someone that doesn't have an account tries to access a page, they receive an error message?

Thanks, Jeffrey.

You need to adjust you web.config file please add the following lines in <configuration>


<location path="Forum.aspx"> <system.web> <authorization> <allow roles="User,Student,Admin" /> <deny users="*"/> </authorization> </system.web> </location>

cheers


Thanks. Two questions though...what tells the website where to redirect. And what would be the best way to add a dozen or so websites to this list?

0 comments:

Post a Comment