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/sitecore/api/ssc/publishing/Targets/{00000000-0000-0000-0000-000000000000}/All'.",
"MessageDetail": "No type was found that matches the controller named 'Targets'."
}
It's similar to what has been reported here: Sitecore Publishing Service does not show the languages and seeing 404 errors yet solutions from there doesn't seem to help.
It is not working on some environments and locally, where recently I have changed way for handling DI. Basically, before we had been using DefaultServiceProviderBuilder
.
We wanted to be able to use our Castle Windsor dependencies in pipeline processors and such, so I've implemented custom Service Provider Builder (using https://github.com/volosoft/castle-windsor-ms-adapter):
public class WindsorServiceProviderBuilder : BaseServiceProviderBuilder
{
protected override IServiceProvider BuildServiceProvider(IServiceCollection serviceCollection)
{
ContainerManager.InitContainer(new WindsorContainer());
ContainerManager.Container.Install(FromAssembly.InThisApplication());
ContainerManager.Container.Register(Classes.FromThisAssembly().BasedOn<IController>().LifestyleTransient());
return WindsorRegistrationHelper.CreateServiceProvider(ContainerManager.Container, serviceCollection);
}
}
When this is in place, everything seems to be working fine when it comes to Sitecore and the application itself, but it's the publishing service that has issues. When publishing an item from content editor, dialog is not populated with targets and languages and the same happens on publishing dashhboard - no running jobs, recent jobs etc. Just the 404 error in the console.
When going to /sitecore/admin/ShowServicesConfig.aspx?details=1
, I can't see on the first sight that something is missing.
When switching back to the previous service provider (default one), things are working fine. But the overriden one doesn't seem to be working. What might be missing here?