Skip to content

Instantly share code, notes, and snippets.

View KayeeNL's full-sized avatar

Robbert Hock KayeeNL

View GitHub Profile
@KayeeNL
KayeeNL / 1. RegisterWebApiRoute.cs
Created June 29, 2016 09:49 — forked from komainu85/1. RegisterWebApiRoute.cs
Web API Registration Sitecore
public class RegisterWebApiRoute
{
public void Process(PipelineArgs args)
{
var config = GlobalConfiguration.Configuration;
config.Routes.MapHttpRoute("DefaultApiRoute",
"MikeAPI/{controller}/{action}/{id}",
new { id = RouteParameter.Optional });
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<api>
<services>
<configuration type="Sitecore.Services.Infrastructure.Configuration.ServicesConfiguration, Sitecore.Services.Infrastructure">
<allowedControllers hint="list:AddController">
<allowedController desc="WallpaperController">MikeRobbins.WallpaperManager.Controllers.WallpaperController, MikeRobbins.WallpaperManager</allowedController>
</allowedControllers>