A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Wednesday, May 3, 2006

SharePoint Explorer

SharePoint Explorer

I have written a small application that will search your SharePoint Portal for sites and lists. All information will be saved in the database. Application has a small interface with three buttons.
Here are the instructions on how to set up this application on your machine. I could have provided a setup but that would have taken lot of space unnecessarily. It is a small application. One EXE and a couple of DLLs!! I have included the complete source code. If EXE gives you an error and tells you that a DLL is missing, just open the project in your studio, include the missing DLLs and compile it.
1. Unzip the zip file to a location on your hard disk.
2. DB folder contains "db.sql" file. Run this file in SQL Query Analyzer to create database tables and stored procedures. It will create a database named "EDMS".
3. "Config" folder contains "traverse.cfg". This file contains database connection string and your portal's URL.
[database connection string]
connection=Server=Your-SQL-Server;Database=edms;uid=sa;pwd=;Pooling=False;
connectio1=Server=;Database=Portal1_SITE;uid=sa;pwd=
[Root URL]
rooturl=http://portal/sites/site1/
Modify the following line in the configuration file and provide correct parameters like your SQL Server name, database name, user ID and password if any:
connection=Server=Your-SQL-Server;Database=edms;uid=sa;pwd=;Pooling=False;
Following line contains URL of your portal site. Edit this line. URL should point to your portal. Do not remove the trailing slash ("/").
Save the file and copy it to your System32 folder on your system drive. For example, If your system drive is C: then copy "traverse.cfg" to "C:WindowsSystem32".
4. BIN folder inside SPExplorer folder contains the EXE file and the DLLs. This EXE is dependant on the following files to run:
a. Interop.Excel.dll
b. Interop.Scripting.dll
c. SPLib.dll
 5. SPExplorer folder contains the source code of the main application. There is another folder called as SPLib. This folder contains the source code for the SPLib.dll assembly.

What does this application do?

This application traverses your portal and finds all sites, subsites, folders, subfolders, lists, etc. It can go to n levels deep for searching. All information is stored in the database. For your convenience, I have created a function that extracts all information from the database and stores it in an Excel file. Click "Start Processing" button to start searching the portal. Click "Generate Excel File" to generate the excel file. Excel file named as SPE-current date-seconds.xls will be generated in the folder where the EXE is being run from. You can run this application periodically to keep the data in the DB updated. After every run, generate a new Excel file. This Excel can be distributed to the managers or other technical people who may be interested to know the number of sites in their organization. Usually, at an enterprise level, each site represents a department in the organization. Therefore, managers may find it useful to have all information about their departments in one place.
This application will serve as a good example for beginners to learn about SharePoint object model.
Send your comments to share.point@yahoo.com

-SSA

No comments:

Post a Comment