FubuMVC using ModifyChainAttributes
January 30, 2015
Let's take a look at a handy way to quickly modify a FubuMVC behavior chain by simply placing an Attribute on the action method. This technique is handy when you have a one off change you need to make to a specific action and rolling your own site wide convention is too much. The Problem FubuMVC uses content negotiation to control how your output model is formatted. Great stuff when you are creating endpoints to be used as an API for your fancy JavaScript framework of choice. We ran into a problem on a specific API endpoint which supports file uploads where IE9 would barf on a JSON response after uploading a file. In this case the response was not being consumed by the client. No big deal let's force the output to be XML to ensure that IE9 is…