How to limit the access to a Controller or a folder in MVC?
问题 I use Asp.Net MVC 3, C# together with ApplicationServices Membership (the standard way suing MS Sql 2008 db). My folder structure is CONTROLLERS -- PageAController.cs -- ADMIN -- PageBController.cs I have a Users some with Role "AdminRole", some with no rules associated (anonymouse). I would like DENY access to the specific Controller and show a LOGIN page for PageAController.cs and to all Controllers within folder ADMIN for User that HAVE NOT the "AdminRole" associated. What it the way to go