Try our conversational search powered by Generative AI!

StructureMap Support


Looking at this post:

I mentions its been tested against CMS, Find, Commerce etc.

Has any work been done on the Community Api? I seem to be running into issues and am having to register dependencies myself, for example:


I'm currently stuck on EPiServer.Social.Common.Rest.IHttpClientFactory and what it implements as I can't used HttpClientFactory as its a static type.

Edited, Aug 10, 2020 18:00

Hi Jacob,

There are packages for the API with the ".Site" suffix (e.g. EPiServer.Social.Comments.Site), which amount to little more than an initialization module that will take care of the dependency registration for you.

Alternatively, if you're in a non-Epi app (or if you're a tinkerer), you can use the factory methods available to construct the services:

() => new DefaultCommentServiceFactory().Create()

Using either of these approaches, you won't need to prepare the service's dependencies manually.

Some additional explanation can be found here.

Edited, Aug 11, 2020 13:26

Hi Chris,

Thanks for getting back to me!

I already have the EPiServer.Social.Comments.Site package installed but still seem to have to prepare the dependencies manually!

For instance, if i don't manually register ICommentService I get:

"...No default Instance is registered and cannot be automatically determined for type 'EPiServer.Social.Comments.Core.ICommentService'..."

Aug 11, 2020 13:38

Interesting -- we'll investigate what's up with that package. Thanks for letting us know.

The second approach should allow you to manually register the service, without needing to handle the entire dependency chain yourself, as a workaround in the meantime.

Aug 11, 2020 13:44

Thanks, I am running version 1.5.4

Aug 11, 2020 13:46
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.