Search Results

Search found 1 results on 1 pages for 'kaijk'.

Page 1/1 | 1 

  • how create a Controller partial class to override OnAuthorization?

    - by kaijk
    I'm trying to change the method OnAuthorization, so that it is available for any application ... this way: public partial class Controller { protected override void OnAuthorization(AuthorizationContext filterContext) { if ((string)(filterContext.RouteData.Values["action"]) == "test") { filterContext.Result = new HttpUnauthorizedResult(); } } } but is showing the compilation error: ...Controller.OnAuthorization(System.Web.Mvc.AuthorizationContext)': no suitable method found to override can someone help me?

    Read the article

1