Use URL Authorization

From Guidance Share

Jump to: navigation, search

- J.D. Meier, Alex Mackman, Michael Dunner, Srinath Vasireddy, Ray Escamilla and Anandha Murukan

To allow anonymous access to public pages, use the following <authorization> element.

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

Use the following <authorization> element inside a <location> element in Web.config to deny access to unauthenticated users and force a redirect to the login page that is specified on the <forms> element:

<location path="Secure" >
 <system.web>
   <authorization>
     <deny users="?" />
   </authorization>
 </system.web>
</location>


References

Personal tools