Mono Support Become a private social network 

Viewed 15928 time(s), 3 post(s), 9/15/2011 9:46:06 AM - by Maxim
9/15/2011 9:46:06 AM
319 Reputation 30 Total posts

How can I set a access to entire site only for authorized users?

1
9/15/2011 10:04:18 AM
7207 Reputation 956 Total posts

Probably the easiest way to achieve this is to set the view privileges on each page that you need to hide from unauthorized users - there will be only 20 or so such pages in the default installation. When logged in as an admin, go to the page administration section (/MonoX/Admin/PageAdmin.aspx), right click on a page in the right pane, select page properties, and select the checkboxes in the "View roles" section for roles that should be allowed to view the page - in your case, these should probably be "Administrators" and "Users" role.
Note that you need to leave Login, Error, and other similar pages open to the public.

2
9/15/2011 10:46:20 AM
15993 Reputation 2214 Total posts

Hi,

there is another way (easier way) to do this, if you want to modify the web.config, you need to configure the authorization section similar to this:

<configuration>
   <system.web>
      <authorization>
         <allow roles="Administrators"/>
         <deny users="*"/>
      </authorization>
   </system.web>
</configuration>

You can read more about this here.

Regards

3
This is a demo site for MonoX. Please visit Mono Software for more info.