Questions tagged [dependency-injection]

Anything related to the use of Dependency Injection (DI)/IoC containers on a Sitecore solution. This also includes the baked-in Microsoft Dependency Resolver included natively in Sitecore versions 8.2 and above.

12 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
991 views

Ninject activation exception on publish: ILogManager

I started getting a strange error on publish in one our our dev sitecore instances that seems to be coming from some Sitecore.Social.Client piplines. Exception[1]: Ninject.ActivationException ...
4
votes
0answers
193 views

After replacing default DI container Sitecore 8.2 Sitecore ItemService and EntityService stop working

Thanks to Dmytro Shevchenko http://structuredcode.com/replacing-default-di-container-sitecore-8-2/ We are replacing default DI Container with Windsor Castle. All project works perfectly fine, except ...
2
votes
0answers
52 views

How to implement DI service configurator in Automation Engine service registration

I am seeking to inject a service with dependencies into a Marketing Automation Activity Type that will be instantiated by the Marketing Automation Engine. I have successfully injected a basic service ...
2
votes
0answers
198 views

How to inject dependencies in solution that extends Sitecore Reference Storefront

I patched the Initialize Pipeline InitializeControllerFactory processor to point to my new solution InitializeControllerProcessor via: <?xml version="1.0"?> <configuration xmlns:patch="http:/...
2
votes
0answers
176 views

Injecting dependencies into custom ServicesApiController without using ServiceLocator

I am injecting a dependency into an custom Api controller I've created that is inheriting from ServicesApiController. I have found that I need to use our service locator class to do this as otherwise ...
1
vote
0answers
317 views

Sitecore 9 Forms - SimpleInjector conflicting with FormBuilderController

Sitecore 9.0.1 (rev. 171219) SimpleInjector v.4.3.0 Glass.Mapper v.4.5.0.4 Steps To Reproduce: In the Sitecore dashboard I click on the Forms button Click the Create button and select Blank Form On ...
0
votes
0answers
80 views

MVC Layout model is empty after Glass Mapper Upgrade

We recently upgraded from Sitecore 8.2.0 to Sitecore 9.2.0. Along with other packages, we also upgraded to the latest compatible version of Glass Mapper 5 for Sitecore 9.2.0. We use Simple Injector ...
0
votes
1answer
194 views

Unable to resolve service for type 'System.Collections.Generic.IList`1[Client.Feature.Membership.Services.FacetUpdaters.IContactFacetUpdater]'

I'm trying to replicate the federated auth from habitat using the Facebook example, and parlay that into auth with Salesforce. I can't get around this dependency injection error though. Starting with ...
0
votes
1answer
80 views

Publishing service 404

XHR requests in my publishing service are returning 404 with messages that resource could not be found: { "Message": "No HTTP resource was found that matches the request URI 'http://instance/...
0
votes
0answers
89 views

Dependency injection container issue SXA

I've recently upgraded the Sitecore 8.2 solution to Sitecore 9.1 update 1 which works fine. But I also have to convert the existing site to SXA site. So, I started by adding the fresh SXA site but ...
0
votes
1answer
224 views

Custom Dependency Injection for Sitecore pipeline processor with Ninject

I can't use the sitecore Dependency Injection. So I've implemented a custom Resolver for my Controllers for Ninject, that works fine. But this is not working for pipelines. How can I create a ...
0
votes
0answers
115 views

Sitecore.Context.Item added to Dependency Injection not working when needed by secodary DI'ed class

I need to get the context item to create a "SearchContext" in my repository class using the following configurator : public class DependencyInjectionConfigurator : IServicesConfigurator { public ...