NancyFx/Nancy.Bootstrappers.Windsor — pull request #17 by do0g (2014-06-26 03:17:34+00:00)
Title: Container incorrectly configured when providing external container via GetApplicationContainer override.

When overriding `GetApplicationContainer` in a subclass of `WindsorNancyBootstrapper` and returning an existing `IWindsorContainer` that is not created by the `WindsorNancyBootstrapper`, the container is not configured correctly for use with Nancy, resulting in the exception ``Castle.MicroKernel.Handlers.HandlerException: Handler for System.Collections.Generic.IEnumerable`1[Nancy.ViewEngines.IViewEngine] was not found.``

Workarounds provided [here](http://www.rscampos.net/post/2012/03/26/Nancy-2.aspx) and [here](http://sixgun.wordpress.com/2014/05/30/nancyfx-castle-windsor/) copy the registration of the components verbatim from `WindsorNancyBootstrapper`. I would like to suggest that the configuration of the container occurs in an override of `ConfigureApplicationContainer(IWindsorContainer existingContainer)` so that both containers owned by `WindsorNancyBootstrapper` and provided to it will result in correctly configured containers. If configuration is not required it will be possible to opt out of the registration via subclass of `WindsorNancyBootstrapper` and override of `ConfigureApplicationContainer`.

Happy to submit a pull request for the change.