Mono Support Whole Site Secure (Closed)

Viewed 40024 time(s), 2 post(s), 2/7/2012 8:12:05 PM - by HPDesign
2/7/2012 8:12:05 PM
15 Reputation 1 Total posts

What is the best way to hide all content behind a login. I only want members that are logged in to be able to see any content.

1
2/8/2012 7:38:52 AM
15993 Reputation 2214 Total posts

Hi,

best approach to do that is to put custom authorization in the web.config e.g.

<system.web>
...
     <authorization>
          <deny users="?" />
          <allow users="*" />
      </authorization>
....
</system.web>

and then expose the pages you want by doing this
<configuration>
...
   <location path="Default.aspx">
        <system.web>
            <authorization>
                <allow users="*" />
            </authorization>
        </system.web>
    </location>
//Put other pages here
...
</configuration>

You can read more about this here "Authorization for a Web application".

Regards

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