Freigeben über


Introducing Site Directory for SharePoint 2010

Those of you that have spent some time looking at SharePoint 2010, may have noticed that the Site Directory has been largely dropped. On account of this, myself and several other writers on this blog have been working on a custom solution called ‘Site Directory for SharePoint 2010’ which is now available on CodePlex here: https://spsitedirectory2010.codeplex.com/

Update 12/05/2010: v1.4 has now been added to the Codeplex site. This includes a wide range of new features including a Site Data webpart, support for sub-sites, support for site images and more flexibility over site directory placement.  

As you’ll guess from the name, this solution aims to provide a similar set of features as the old 2007 Site Directory but it goes a bit further and has several key benefits over the way Site Directory was implemented in 2007. Before we go into details about what our solution does, lets take a minute to explore why we felt a custom solution was needed.

What do you mean, the Site Directory has been dropped!?

In SharePoint 2010, it is no longer possible to create a new site based on the Site Directory site definition. However the site definition is still installed and if you are willing to hack the webtemp.xml files a bit you can create site based on the old 2007 definition but it is literally that. It does exactly what the 2007 site directory did, with a few deprecated features including the ‘create site’ button.

The purpose of the retaining the old site definition in 2010 is purely to support in-place upgrade scenarios from 2007 to 2010. No investment has been placed into the site definition capability for 2010 and the intention is that you build your own solutions.

Additionally, I know many customers found the 2007 site directory somewhat lacking in functionality, common complaints included:

  • The disconnection between the site and the site list item. Especially regarding site that were create outside of the site directory
  • Awkward user interfaces
  • Limited scope to the local web application
  • The broken links scan job did not fully remove stale listings
So what does Site Directory for SharePoint 2010 do?

The solution we have built takes the principles of the old 2007 site directory and extends them for SharePoint 2010. There are three main components

  • Site Listings List: A basic SharePoint list which stores an entry for each site that is picked up by the Scan Job. This list includes a large range of default metadata, which is entirely taken from the site itself (no manual intervention). The default fields are:
    • Title
    • Owners (3 configurable methods of classifying owners)
    • Create Date
    • URL
    • Description
    • ID (Guid)
    • Site missing Count (used by the delete job to keep a tab on how many times the site has been missing when scanned)
    • Template (support all site definitions and templates, including custom ones)
    • Sub webs
    • Multilingual
    • Author (the user who created the site)
    • Language
    • Secondary Contact
    • Storage used (in Mb)
    • Hits
    • Site Quota Used (as a %)

image

The idea is that this list can be used as-is or administrators can add additional fields which map to their business. These could even use the new Managed Metadata Service.

The Site Listing itself is driven via a Content Type.

  • Update 12/05/2010: Site Data Webpart: A webpart which can be placed on each site to show that site's listing data from the site directory.
  • Scan Job: A timer job which scans Web Applications for sites and updates or adds to the Site Listings list. Supports exclusions, three different ways of identifying Site Owners and can be configured for multiple Web Applications, each with their own schedule.
  • Delete Broken Listings Job: A timer job which checks each Site Listing to see if it exists. If it does not then it keeps a count of how many times it was missing and then removes the listing once a configurable number of missed scans is reached.

In addition to the three main functionality components, there is a set of comprehensive administration pages which allow administrator to fine tune the solution.

How was it written?

The solution was written entirely using Visual Studio 2010 against SharePoint 2010 release candidate. So if you are yet to play with Visual Studio 2010 for SharePoint development, this solution is a great starting point as it touches on many different aspect of a SharePoint solution.

Naturally, the solution uses features as much as possible and is packaged into a single WSP file.,

How do I get it?

The solution and source code is available now on CodePlex on this URL: https://spsitedirectory2010.codeplex.com/

Next Steps

This is just v1.0 of the solution. We have many ideas of things we could do to improve it so if you have a great idea or request please either comment on this blog article or use the discussions feature on the CodePlex site to add your comments.

This article was published by

MartinKearn

Martin Kearn Senior Consultant Microsoft Consulting Services UK Martin.Kearn@Microsoft.com

Click here for my bio page

Please feel free to contact me directly via email or via the blog comments if you have something to say about this article.

Comments

  • Anonymous
    April 06, 2010
    Look like a very handy utility - look forward to getting it installed and having a play. Great Job guys

  • Anonymous
    June 11, 2010
    The comment has been removed

  • Anonymous
    August 27, 2010
    Will this work for Sharepoint Foundation 2010?  If so, I can successfully deploy to my two WFE but  I keep on getting an error on the web application server as I deploy the solution that states: Error: Cannot add the specified assembly to the global assembly cache: Microsoft.MCSUK.SPSiteDirectory2010.resources.dll.

  • Anonymous
    October 22, 2010
    Could you post some pictures of what the directory looks like? I looked through all the documentation but haven't seen any.

  • Anonymous
    June 14, 2011
    I couldn't get this to work on an https site.  Bummer! :-(  Kept getting an Access Denied error.   Would be great if it worked. Access Denied issue details: spsitedirectory2010.codeplex.com/.../235733

  • Anonymous
    August 04, 2011
    How do I perform search in site directory list? it isn't working...

  • Anonymous
    August 04, 2011
    The site listings list is just a regular SharePoint list so it should be searchable just like any other list. If thi sis not working, investigate you general search settings and compare to other custom lists.

  • Anonymous
    August 04, 2011
    Yes, I created a new scope with this rule: Scope Rule Type: Web Address Folder: Folder = http://webapp/sites/SiteDirectory/Lists/SiteListingsInstance/ Behavior: Include Am I missing something?

  • Anonymous
    September 21, 2011
    Can we have more screen shots of the site directory, I didn't find any screen shots on code plex or in any of the documentation.

  • Anonymous
    December 05, 2011
    I am getting "This not a valid site directory. Specify a URL to a site that is using the site directory template." when i am trying to do "Configure the Site Directory" in central admin . although the solution is deployed to the central admin site ... what am i missing?

  • Anonymous
    March 02, 2016
    Site directory list in share point 2013..????