Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This is everything you need to register a servicestack service in Sitefinity. Just set your Route, and make sure to register the plugin in App_Start.
using System;
using System.Collections.Generic;
using System.Linq;
using Telerik.Sitefinity;
using Telerik.Sitefinity.Model;
using Telerik.Sitefinity.DynamicModules;
using Telerik.Sitefinity.Data.Linq.Dynamic;
using Telerik.Sitefinity.Services.Search;
using Telerik.Sitefinity.Utilities.TypeConverters;
using ServiceStack.Text;
using ServiceStack;
using Telerik.Sitefinity.DynamicModules.Model;
namespace «FieldStart»«TextLink("MyNamespace")»«FieldEnd» {
#region PLUGIN
public class «Link("Custom")»ServicePlugin : IPlugin
/// <summary>
/// Call this at Global.asax, Application_Start
/// SystemManager.RegisterServiceStackPlugin(new «TextLink("MyNamespace")».«Link("Custom")»ServicePlugin());
/// </summary>
public void Register(IAppHost appHost)
#region SERVICE
public class «FieldStart»«Caret»«Link("Custom")»«BlockAnchor»«FieldEnd»Service : Service {
public object Any(«FieldStart»«Link("MyFirstRequest")»«FieldEnd» request) {
return "Hello World";
#region REQUEST
public class «Link("MyFirstRequest")» : IReturn<string> {
public string Param1 { get; set; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment