How to Securing Your Entire Application Using a Global Authorization Filter in MVC

For many sites, nearly the entire application should require authorization. In this case, it’s simpler to require authorization by default and make exceptions in the few places where anonymous access is allowed — such as the site’s home page and URLs required for the login process. For this case, it’s… Continue reading

How to Securing Entire Controllers in MVC

The preceding scenario demonstrated a single controller with the AuthorizeAttribute applied to specific controller actions. After some time, you realize that the browsing, shopping cart, and checkout portions of your website each deserve separate controllers. Several actions are associated with both the anonymous Shopping Cart (view cart, add item to… Continue reading

Windows Authentication in the Intranet Application Template in MVC

The Intranet Application template (available in ASP.NET MVC 3 Tools Update and later) is very similar to the Internet Application template, with one exception: It replaces Forms Authentication with Windows Authentication. Because Registration and Log On with Windows Authentication are handled outside of the web application, this template doesn’t require… Continue reading