Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 05, 2009 03:19 AM by jcb871
Jun 11, 2009 06:59 PM|LINK
Hi. My clubsite is online now, thanks to help from this forum. I would like to be able to restrict access to events and maybe some other pages by roles. Right now it looks like there are three roles, Administrators, Members(anyone logged in) and Guests
(anyone not logged in). I'm familiar with how the classified starterkit controls access by using roles in the sitemap file. That doesn't seem to work with the clubsite. Would someone point me in the right direction to limit access to pages based on user
status or roles?
Club Starter Kit
Jun 11, 2009 07:26 PM|LINK
Are these pages in a separate folder or under the root folder directly? Sitemap trimming only hides the links to the pages in the menu, it won't prohibit access to the secured pages. You have to apply some sort of restriction separately. You can do that
by <location> tag in web.config file like this:
<allow roles="Administrators, Users"/>
Jun 11, 2009 08:21 PM|LINK
Thank you so much. That worked like a charm! Bev
Jun 11, 2009 08:24 PM|LINK
You are welcome.
Aug 05, 2009 03:19 AM|LINK
Thank you a lot for that code... :)
I need tyo show some message when the user is not authorized to view the page.
Now it automatically redirects to login page.
Thanks for help :)