Go back to index
How to delete content source
Following code block explains how to programmatically delete a content source in 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");
// Delete Sharepoint Content Source
SPTReturn returnObj = ssp.DeleteContentSource("SPTool SPCS");
// Check the status of content source deletion
if (returnObj.State == SPTState.Success)
{
// Content Source deletion successful
}
else
{
// Content Source deletion Failed
}
}
}
}
Go back to index