Go back to index
How to create shared scope
Following code block explains how to programmatically create a shared scope in a SSP.
using System;
using SPTool.Library;
namespace SPTool.Test
{
class Program
{
static void Main(string[] args)
{
SPTSharedServiceProvider ssp = new SPTSharedServiceProvider("http://sptool:5000/ssp/admin");
// Create Shared Scope
SPTReturn returnObj = ssp.CreateSharedScope("SPTool Scope","SPTool Scope Description", true, "","AlwaysCompile");
// Check the status of scope creation
if (returnObj.State == SPTState.Success)
{
// Creating scope successful, lets create a dummy scope
returnObj = ssp.CreateSharedScope("Dummy Scope", "Dummy Scope Description", true, "", "AlwaysCompile");
}
else
{
// Creating scope Failed
}
}
}
}
Go back to index