This project is read-only.

Installing in SharePoint

Install the Prerequisites

Download and install the Camelot .NET Connector

Download and install the Camelot SharePoint Integration Toolkit

Note! To use the Camlot JSON API you don't need to start the Camelot SharePoint Integration Service, simply install the toolkit is enough.

Install the Camelot JSON API binaries

Donwnload the latest binaries from this site and simply drag them to the bin folder of your SharePoint web site. Usually the path is similar to this C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin, if you plan to use the JSON API on more than one SharePoint Web simply copy and paste the binaries into the bin folders of the other webs as well.

There should be two .dll files in the package, place them in the /bin folder of your SharePoint Web

  • Camelot.JSONAPI.dll
  • Newtonsoft.Json.dll

Modify your web.config

Note! This example is for SharePoint 2013 running .net 4. Other samples will be posted asap.

Create a backup of your web.config before editing the file!

Locate the web.config file from the parent directory of where you placed the binary files. Open the file in the text editor of your choice.

Add a connectionstring

Insert a connection string in the <configuration> section. The name of the connection string is the reference to the connection parameter in the Camelot JSON Command Object.

  <add name="Default" connectionString="server=serverurl;database=/;user=accountname;domain=;password=yourpassword;DefaultLimit=10000;TimeOut=120"/>

To add several connection strings simply create several elements

  <add name="Default" connectionString="server=serverurl;database=/;user=accountname;domain=;password=yourpassword;DefaultLimit=10000;TimeOut=120"/>
  <add name="Web1" connectionString="server=web1;database=/;user=accountname;domain=;password=yourpassword;DefaultLimit=10000;TimeOut=120"/>
  <add name="Web1_Sales" connectionString="server=web1;database=/sales/;user=accountname;domain=;password=yourpassword;DefaultLimit=10000;TimeOut=120"/>
  <add name="OtherConnectionString" connectionString="server=otherserver;database=/;user=accountname;domain=;password=yourpassword;DefaultLimit=10000;TimeOut=120"/>

Official connection string documentation:

Add the Service Model

Next step is to register the JSON service in the web.config file allowing us to communicate with SharePoint through the API.

Find the <system.serviceModel> element in the web.config file, if it doesn't exist simply create it in the <configuration> section

  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="0">
      <add relativeAddress="~/camelot/jsonapi.svc" service="Camelot.JSONAPI.JsonService" factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" />

      <behavior name="EndpBehavior">
        <!--<enableWebScript />-->
        <webHttp />

      <behavior name="ServiceBehavior">
        <serviceMetadata httpGetEnabled="true" />
        <serviceDebug includeExceptionDetailInFaults="true" />
      <behavior name="">
        <serviceMetadata httpGetEnabled="true" />
        <serviceDebug includeExceptionDetailInFaults="true" />

    <!-- webHttpBinding is required to consume the service from JS -->
    <service behaviorConfiguration="ServiceBehavior" name="JsonService">
      <endpoint address="" behaviorConfiguration="EndpBehavior" binding="webHttpBinding" contract="JsonService">

Note! Some of these settings may be customized to better fit your needs

Add a location element (optional)

Adding a location element is optional but may help in some setups. Insert the location element after the closing of the </system.serviceModel> element.

<location path="camelot">
    <identity impersonate="true" />
      <allow users="?"/>

Last edited Jan 24, 2013 at 5:01 PM by Bendsoft, version 11


No comments yet.