Project Description
This project enables webservices in a sandbox environment.
This is by now, a functioning POC

Supported functions:

- Create a sample sandbox webservice webpart
- Add the sample sandbox webservice webpart to the new sandbox webservice pagelayout
- Javascript/Ajax class to call the sandbox webservice.
- Json objects (Javascript -> Webservice)

Not-supported functions (by now)

- Testing
- Master Sandbox Webservice Webpart in seperate feature.
- Soap (C# -> Webservice)
- VS2010 sandbox webservice template/wizard

Getting started:

  1. Download the solution from Source code.
  2. Build and deploy the Tsol.SandboxWebservicePage project
  3. Create a new webpart library called "sbwp" (SandboxWebservicePages)
  4. Build and deploy the Tsol.SandboxWebserviceSample project
  5. Open the sandbox webservice page "sbwpSample.aspx" in the library "sbwp" : "sbwp/sbwpSample.aspx"
  6. Add the sandbox webservice webpart SandboxWebserviceSamplePart (under Custom) to the page.
  1. Create a new webpartpage in a library of your choice eg. sample documents.
  2. Insert the standard sharepoint 2010 webpart : HTML Form Web part on the webpartpage.
  3. Edit the source of the webpart by clicking the "Source Editor.."
  4. Insert the code from the "CallSandboxWebservice.htm" from the Tsol.SandboxWebserviceSample project

<script type="text/ecmascript" src="_layouts/Tsol.SandboxWebservicePage/SandboxWebservice.js" ></script>
<script type="text/javascript">

function callSandboxWebservice() {

var webserviceUrl = "http://<yoururl>/SBWP/sbwpSample.aspx";
var webserviceName = "SandboxWebserviceSamplePart";
var sandboxWebservice = new SandboxWebservice.Net(webserviceUrl, webserviceName);
function (response, userContext) {
alert(response.Name + ", " + response.Address);


  1. Click "save" and the webservice is called showing an alert box "John Doe, theaddressstret 555"..

Last edited Jun 27, 2010 at 2:00 PM by tsol, version 7