EPiServer 7 MVC with Windsor Container

Mike Hook
Member since: 2008


I'm trying to install EPiServer 7 on an existing MVC site. However I've hit a problem with the IoC Container. Currently the site is using the Windsor container, however I gather that EPiServer 7 uses StructureMap internally.

Do you think there is any way Windsor could be retained as the Container or will I need to replace it completely with StructureMap?

Thanks, Mike



#65906 Feb 13, 2013 19:39
  • Stefan Forsberg
    Member since: 2007

    Although I haven't tried it personally you should be able to run windsor and SM side-by-side.

    If you keep the windsor container and you want to inject something EPiServer-specific you'd have to handle those registrations yourself. Dependening on your setup with your current container and the number of registrations you are interested in from EPi's container you could either register those manually or build some windsor plugin that checks itself for dependencies first and delegates to EPi's container if the dependency is not found.

    #65907 Feb 13, 2013 19:56