The following two Visual Studio .NET C# functions can be used to enumerate the list of personal dashboards found in all of the workspaces on a particular server running SharePoint Portal Server 2001 as well as the SharePoint Portal Server 2003 backward-compatible document store. The list of personal dashboard sites can be used to create SharePoint Portal Server 2003 sites (see Appendix B).
Note When the SharePoint Portal Server 2001 document libraries are upgrade to the SharePoint Portal Server 2003 backward-compatible document libraries, all of the original workspace folders and content can be found in the upgraded document libraries (includes the Dashboards personal dashboard folders). While the original content is available, the digital dashboard portal site technology is not.
How to Enumerate SharePoint Portal Server 2001 Personal Dashboards
void EnumerateSPS2001Workspaces( string urlServer )
{
PKMCDO.KnowledgeServer kServer = new PKMCDO.KnowledgeServer();
Object oNull = null;
ADODB.Recordset rsWorkspaces = new ADODB.Recordset();
string urlWorkspaceFolder = urlServer
+ "/Sharepoint Portal Server/workspaces/";
Console.WriteLine("urlWorkspaceFolder: " + urlWorkspaceFolder);
kServer.DataSource.Open(urlWorkspaceFolder,
oNull,
PKMCDO.ConnectModeEnum.adModeReadWrite,
PKMCDO.RecordCreateOptionsEnum.adFailIfNotExists,
(PKMCDO.RecordOpenOptionsEnum)0,
"Administrator", "" );
rsWorkspaces = (ADODB.Recordset)kServer.Workspaces;
rsWorkspaces.MoveFirst();
while(!rsWorkspaces.EOF)
{
string sWorkspace = (string)rsWorkspaces.Fields[0].Value;
Console.WriteLine("Workspace: " + sWorkspace );
string urlPersonalDashboard = urlServer + "/"
+ sWorkspace + "/Dashboards";
Console.WriteLine("Dashboards Folder: " + urlPersonalDashboard );
EnumerateSPS2001PersonalDashboards(urlPersonalDashboard);
rsWorkspaces.MoveNext();
}
rsWorkspaces.Close();
}
void EnumerateSPS2001PersonalDashboards( string urlPersonalDashboard )
{
PKMCDO.KnowledgeFolder kFolder = new PKMCDO.KnowledgeFolder();
ADODB.Recordset rsPersonalDashboards = new ADODB.Recordset();
Object oNull = null;
kFolder.DataSource.Open( urlPersonalDashboard,
oNull,
PKMCDO.ConnectModeEnum.adModeReadWrite,
PKMCDO.RecordCreateOptionsEnum.adFailIfNotExists,
(PKMCDO.RecordOpenOptionsEnum)0,
"Administrator", "" );
rsPersonalDashboards = (ADODB.Recordset)kFolder.Subfolders;
while (!rsPersonalDashboards.EOF)
{
Console.WriteLine("Personal Dashboard: "
+ rsPersonalDashboards.Fields["DAV:href"].Value.ToString() );
rsPersonalDashboards.MoveNext();
}
rsPersonalDashboards.Close();
}