Answered on stackoverflow: http://stackoverflow.com/questions/3658283/cancel-controller-action-from-initialize
-- Mauricio On Tue, Sep 7, 2010 at 8:39 AM, Jimmy Shimizu <[email protected]>wrote: > I have come across a scenario where I have some initialization code on > my base controller, which might identify an invalid state which will > demand some user interaction. > > There for, I want to redirect the customer to another page/action if > that occurs. Since I don't want the initial action to run if I hit > this invalid state, I want to cancel the whole request including the > action. > > Is this possible? We have figured out that one way to solve it is to > use a Filter which reads out from Context.Items if it should cancel > the action, but is there another, easier way? > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]<castle-project-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
