Posted on: 12/5/2013 10:35:21 AM | Views : 992

Hi, 
I am trying to show a modal popup to inform the user that the link/action/resource he selected is no authorized for his role. I have decorated the function with a custom annotation 
[AutorizacionUsuarios (Roles = "Informatico") ] And Override the HandleUnauthorizedRequest
protected override void HandleUnauthorizedRequest(System.Web.Mvc.AuthorizationContext filterContext) { if (filterContext.HttpContext.Request.IsAuthenticated) { filterContext.Result = new System.Web.Mvc.HttpStatusCodeResult((int)System.Net.HttpStatusCode.Forbidden); } else { base.HandleUnauthorizedRequest(filterContext); } But it generates a new page/view with the error info, I would need to show a modal popup dialog on the view/controller that generate the call to the unauthorized functions.
As an ...

Go to the complete details ...