Я думаю, вам просто нужно установить свойство actionContext.Result перед тем, как покинуть обработчик.Примерно так:
public class SessionExpireAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext actionContext)
{
// Adjust this if statement so it's executed hit if your special authentication has *failed*
if (true)
{
actionContext.Result = new HttpUnauthorizedResult("You don't have access to this resource.");
}
base.OnActionExecuting(actionContext);
}
}
Если вы ничего не делаете в обработчике, действие контроллера будет выполняться как обычно.