Category Archives: MVC

ASP.Net MVC: Simple Custom Authorization by Inheriting from the AuthorizeAttribute

Implementing custom authorization to a ASP.Net MVC site can be quite simple if you take advantage of the built-in ActionFilter authorization framework. Here’s how to do it. First, this enumeration describing four levels of access to the site.   // … Continue reading

Posted in ASP.Net, Attributes, C#, MVC | Leave a comment

ASP.Net: App_Offline.htm as a Maintenance Page

While Googling about, I came upon an oldy-but-goody, that apparently has been available since the release of ASP.Net 2.0: App_Offline.htm. An undocumented feature, you can copy a file called app_offline.htm into the root of your .Net website and the application … Continue reading

Posted in ASP.Net, IIS, MVC | Leave a comment

ASP.Net MVC: Partially Secured Sites / Switching from HTTPS back to HTTP

Most sites out there have some portions that should be only served via HTTPS, while the remainder can be HTTP, such as account pages and content pages respectively.  This is sometimes called a “partially secured site.” Starting with MVC 2, … Continue reading

Posted in ASP.Net, C#, MVC | 2 Comments