So I have a Sitecore (CMS) web application, using Spring.Net for DI. Works great, except some small problems with a custom LinkProvider.
Since a LinkProvider is being created by Sitecore very early (apparently before Spring loads) any dependencies I am trying to inject are not being injected at instantiation of the LinkProvider object (it’s a singleton managed by the Sitecore instance).
So, I need to load the Spring container earlier in the pipeline, which I think I can do thanks to some help from John West – but after inspecting the Spring HttpModule, I am not sure about how to do it….does anyone have experience in this area?
Turns out loading the container wasn’t the problem….the items in the CMS are created via the CMS platform, so instantiating dependencies in them required the manual syntax used by the framework.