Hot answers tagged


You have most of the pieces you need, but not all. You need a patch config <configuration xmlns:patch=""> <sitecore> <initialize> <processor patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']" type="...


MapRoute is meant for MVC controllers whereas MapHttpRoute is meant for Web API controllers. ServiceApiController is ApiController, and you should register your route with MapHttpRoute instead of MapRoute. Just register your route with: GlobalConfiguration.Configure(config => { config.Routes.MapHttpRoute("botroutes", "api/messages", new { ...


As described in this blog post - , you can use a ServiceConfigurator to register your API controllers using Sitecore DI. Don't forget to patch it in. namespace Feature.GenericCallout { public class ...


It is not supported. They both are used only for accessing items content, CRUD operations over an item and items searching. You can find full API overview in official developer guides: Sitecore Service Client Item Web API


From the exception it looks like it's ViewContext missing. I'm not sure why it happens in your scenario but to fix this you can try the following code: @using (Sitecore.Mvc.Common.ContextService.Get().Push(Html.ViewContext)) { @Html.Sitecore().Rendering() } It will make sure that ViewContext is pushed to the ContextService.

Only top voted, non community-wiki answers of a minimum length are eligible