Mono Support Whole Site Secure (Zatvorena)

40722 put(a) pogledan, 2 odgovor(a), 7.2.2012. 20:12:05 - Kreirao(la) HPDesign
7.2.2012. 20:12:05
15 Reputacija 1 Ukupno objava

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
8.2.2012. 7:38:52
15993 Reputacija 2214 Ukupno objava

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
Ovo je MonoX demo site. Posjetite Mono Software za više detalja.