SharePoint 2010 Generic Solution Validator

Sandboxed Solutions are not a very practical way of  testing solutions in production.  It opens up a world of bad things to happen.  That being said, there are still some good things that can come from them. 

The blocking solution provided in Central Administration is a complete joke, it won't help you for governing sandboxed solution deployment AT ALL.  However, I have built a tool that will solve many of the deployment issues with Sandboxed Solutions.  I call it the Generic Solution Validator.  It is scoped to a Site Collection level and allows you to ALLOW or BLOCK solutions based on various properties.  Properties much more valuable than the SCA provides.

I have posted the Generic Solution Validator to codeplex.


SharePoint Timer Jobs

Have I mentioned how much I don't like Timer Jobs?  Let me rephrase that, timer jobs that other people write that aren't designed correctly?  Yeah, irks me.  So we can't say that all the Timer Jobs in the Beta are perfect, some have some issues, but its beta and we should come to expect not everything is going to work right now. 

For those that really cause us trouble though, how do we debug them?  We can attach to the owstimer.exe service I suppose, but then you are causing more problems with the other jobs waiting to get some of the precious CPU cycles while your debugging.

So how about we try a different approach?  I like using SQL Profiler, it is one of my favorite tools. It comes in really handy to figure out what really is going on on a SharePoint page (the Developer Dashboard is nice, but don't let it fool you, there is more going on than what it tells you) and…Timer Jobs.  problem is, sql profiler requires you to get really specific about what you want to see.  Not much you can do when everything coming in is tagged as a ".NET Application"…except for…turn everything OFF!

Turn off all the services, turn off all the timer jobs you don't want to look at or care about.  Turning off services is easy enough to do…timer jobs…ugg…little more difficult.  What about searching for a timer job?  Yeah, good luck with that one with just Out of the Box.

So I built a neat little tool and posted it to codeplex.  It lets you turn all the timer jobs off, now two of them cannot be turned off, but they don't end up causing much traffic, so no worries there.  With this tool you can search for timer jobs by Name, Title, ID, Schedule and Lock Type.  You can update, updateable properties and click "Update".  You can disable, enable and "Run Now" with just a click of a button!

Sweet!  Download the source code here:

I plan on doing some heavy reverse engineering on some of these bad boys…I encourage you to do the same!


SharePoint Remote Blog Storage (RBS) – Step by Step Install

I just setup RBS/RBS Filestream on my 2010 farm.  Not so sure about the functionality being pushed to the SQL Server team for this.  I really liked the COM based approach of EBS in 2007 (which is now marked as obsolete, but supposedly still supported – and when I say 'supported' I simply mean it still works – going forward in 2010), but hey, when you don't have budget/time, send it off to someone else that does right?  These steps will get your RBS FILESTREAM sql provider working sorry no screen shots, you only get those in the courses.

So why RBS? What is it you ask?  It stands for Remote Blog Storage.  We'll, lets start with the fact that when you add a document to SharePoint goes into the content database (the binary is serialized into a stream and put into the database, but not really put into the database, but a pointer in sql server row to a set of 8k pages somewhere on disk that represents those files).  All documents go into the content database with out discrimination.  Should there be discrimination?  Yep.  Some people would migrate file shares to sharepoint which would include install isos, some being in the gigabyte size.  These days we can safely say that SQL Server it is a high volume transactional store and yes, it has the ability to store blobs, just not as efficiently as some applications would like.  Because of this, IT depts would say "No" don't put that large file in sharepoint. 

Well of course that leads to confusion as to what goes in and out of SharePoint (the fileshare lived another day in 2007).  In 2007, the SharePoint team introduced EBS which was a COM component based implementation of passing off the BLOB to something else to manage.  RBS is the continuing evolution of this with SQL Server becoming the management point.  Now IT Depts can say, sure throw that into SharePoint!  No confustion, SharePoint is now the hub of everything!  IT Depts can set the size at which RBS kicks in and sends the file somewhere else.  If the RBS becomes obsolete there are ways to migrate back into SharePoint or change the RbsID to migrate to a new store (you will see the new RbsId column in the content database).  Writing an EBS or RBS implementation is NOT easy.  I did an EBS for 2007, and I'll be the first and not last to tell you, the COM interactions, memory management, and file manager components require some thought and patience.  That being said, you will be at the mercy of Microsoft and 3rd parties to create scalable robust EBS/RBS implementations for your sharepoint system.

After publishing this, we had a nice twitter conversation about StoragePoint. It has some awesome RBS connectors!  You should check them out!

The detailed TechNet version of RBS install process is here.  Mine is a more condensed version of the basic steps.

If you like this, be sure to follow me on twitter! More to come!

Exercise 1 – Setup RBS FILESTREAM

up RBS FILESTREAM is fairly simple.  In this lab we
will configure RBS in SQL Server and then RBS Client for Sharepoint 2010

A content database that uses RBS FILESTREAM

Task 1 – Enable

  1. Open SQL Server Configuration
  2. Click “Sql Server Services”
  3. Right click “SQL Server
    (MSSQLServer)”, select “Properties”
  4. Click the “FILESTREAM” tab
  5. Check all the checkboxes

  1. Click “Apply”
  2. Open SQL Server Management
  3. Connect to the localhost
  4. Right click the instance,
    select “Properties”
  5. Click the “Advanced” tab
  6. For the “Filestream Access
    Level, select “Full access enabled”
  7. Click “OK”
  8. Restart the SQL Server

Task 2 – Prep the

  1. Open a query window, run the
    following sql command:

use [WSS_Content_100]

if not exists (select * from sys.symmetric_keys where
name = N'##MS_DatabaseMasterKey##')create master key encryption by password =


  1. Run the following:

if not exists (select groupname from sysfilegroups where
groupname=N'RBSFilestreamProvider')alter database [WSS_Content_100]

 add filegroup
RBSFilestreamProvider contains filestream


  1. Run the following:

alter database [WSS_Content_100] add file (name = RBSFilestreamFile, filename
= 'c:Blobstore') to filegroup RBSFilestreamProvider


  1. Expand “Databases”
  2. Right click “Databases”,
    select “New Database”
  3. For the name type,
  4. Click “Ok”

Task 3 – Install the
RBS Client

  1. Run d:lab workRBS_x64.msi
    • NOTE: This task is to walk you through the GUI of the install
      program to see the various items that you COULD configure, later you will
      see that this is not necessary as we will re-run in a silent mode for
      SharePoint – product team has also suggested that you NOT run this step as it may add extra settings that could cause problems later!)

  1. Click “Next”

  1. Click “I accept the terms…”
  2. Click “Next”
  3. Click “Next”

  1. Click “Next”

  1. Click “Test Connection”
  2. Click “Next”

  1. Click “Next”
  2. Check the “Show the advanced
    configuration options” checkbox

  1. Click “Next”
  2. Review the settings:

  1. Click “Next”
  2. Review the properties of the
    “Maintainer Task”, this is used to clean up orphaned records that may not
    exist in SharePoint anymore (a user deleted the file in the document
    library).  Check all the checkboxes:

  1. Click “Next”
  2. For this lab, set all the
    logging setting to “Verbose”:

  1. Click “Next”
  2. Click “Install” – AGAIN NOTE – this is for FYI only, you should click "Cancel" if doing this for real
  3. Click “OK” in the task window

Task 3 – Configure
SharePoint 2010

  1. Open a SharePoint Management
  2. Run the following commands
    from the location of the RBS_X64.msi file (this would need to be run
    against each content database that you want to support RBS):

msiexec /qn /lvx* rbs_install_log.txt /i RBS_x64.msi


msiexec /qn /lvx* rbs_install_log.txt /i RBS_x64.msi
DBNAME="WSS_Content_100" DBINSTANCE="servername"


  1. Open the rbs_install_Log.txt
    file, at the end of the file, look for:
    • Product: SQL Remote
      Blob Storage — Configuration completed successfully.
  2. You can also check the content database and look for some new tables "mssql*"
  3. Run the following (note this
    only works if the web app has one content database):

$cdb = Get-SPContentDatabase –WebApplication 

$rbss = $cdb.RemoteBlobStorageSettings






Task 4 – Test your RBS Provider

  1. On the SQL Server, open the “c:BlobStore”
    folder, this is where your blobs will go by default
  2. Open the team site (http://servername:100)
  3. Add a new document called
    “MyRBSFile” to your document library (make sure it is above 100K as you can set the file size boundary in RBS to move between content db and RBS connectors)
  4. Refresh the c:BlobStore folder,
    you should see a new file in one of the directories
  5. Run the following query
    against your Content database (NOTE: run this against your dev enviornment ONLY so as to not cause any locks on your prod databases):

select ad.SiteId,, leafname, rbsid

  from alldocs
ad, alldocstreams ads

  where =

  and rbsid is
not null




  1. You should get a query back with information on all
    files that have been submitted to the RBS.


SharePoint Federated Results

Here are some simple steps to get Federated search results to work in SharePoint 2010.  Its actually really simple, Kudos to the search team.  Note that this sets up a new Bing federated result, there is already one in there, but this walks you through setting up from scratch.


Exercise 1 – Setup Federation

Purpose:         Learn to pull in outside search results (federation)
from Bing.

Federated search results

Task 1 – Configure your Search Application

  1. Open SharePoint Central
  2. Click “Application
  3. Click “Manage service applications”
  4. Click “My Search Application”
  5. Click “Federated Locations”
  6. Click “New Location”

  1. For location name, type
  2. For display name, type “Bing”
  3. For description type,
    federated results from Bing Search provider”
  4. For author, type “Microsoft”
  5. For version type “”
  6. Leave the Trigger as “Always”
    • NOTE your options,
      prefix and pattern can be applied to the search keywords in deciding to
      send a query to the federated provider
  7. For location type, click
    “OpenSearch 1.0/1.1”
  8. For the query template, type{searchTerms}&format=rss
  9. Note your ability to modify
    the formatting of the results returned from the provider
  10. Note your ability to restrict
    the federated results at a site collection level
  11. Note your ability to set
    credentials for the federated provider
  12. Click “OK’

Task 2 – Set your Search Application

  1. Open Central Administration
  2. Click “Application
  3. Click “Configure service
    application associations”
  4. Click “Default”
  5. Check “My Search Application”
  6. Click “Set as default”
  7. Click “OK”

Task 2 – Test your new federation provider

  1. Open your search center (http://servername:115)
  2. Run a search for “SharePoint”,
    you should get no federated results
  3. Click “Site settings->Edit
  4. Find the “Top federated
    results” web part
  5. Click “Edit web part”

  1. Select “Bing”
  2. Click “OK”
  3. Run a search for “SharePoint”,
    you should get back a single federated result (the top one):

  1. Click “Site Actions->Edit
    • NOTE: you may have to click back to the home page, run a search
      and then click “Site Actions->Edit Page”, there seems to be an issue
      with resending the same query in Beta
  2. Edit the Top Federated
    Results web part, expend “Display Properties”
  3. In “Results Per Page”, set it
    to 3
  4. Click “Ok”, rerun your
    search, you should now see the top 3 results:

Solution Validators – Sandboxed Solutions

So you read my last post and decided that maybe SandBoxed Solutions isn't that great of an idea.  You decided to implement a Solution Validator to limit what your ole developers are doing.

You got the validator created and you installed it, but then realized, its not quite right.  So, you undeploy it right?  Oh, wait, every object that goes in the Object hierarchy table has to have a "public" contructor for deserialization (ie, pulled out of the ConfigDB and turned into memory). Otherwise you get a nice error in Visual Studio and/or Central Admin and you won't be able to retract the solution.

Exception in RefreshCache. Exception message : "MySolutionValidator.MySolutionValidator cannot be deserialized because it does not have a public default constructor."

K, if you followed the little article up there, then you'll notice that particular piece is missing!  Now your stuck…how do you get it out?  Well, you gotta run a command against the config database: NOTE:  This is a highly dangerous operation, if you mess it up, your Farm gets deleted!

delete from Objects
where properties like '%MySolutionValidator%' –or to be more safe, the full assembly name

You could also run the following stsadm command provided you do the query to find the id in the Config database:

select id, properties from Objects
where properties like '%MySolutionValidator%'

STSADM -o deleteconfigurationobject -id “id retrieved from object table”

This will clear the object and the retract will succeed.  This will be the case for ANYTHING that goes into the object hierarchy table.



Missing Server Side Dependencies – 8d6034c4-a416-e535-281a-6b714894e1aa

So what is this you ask?  Well, I did a little digging, I watched the Timer Job and the query it sent ( to the content database of the central admin site):

SELECT tp_WebPartTypeId, COUNT(1), tp_Assembly, tp_Class
WHERE tp_WebPartTypeId IS NOT NULL GROUP BY tp_WebPartTypeId, tp_Assembly, tp_Class

You get back a result set that has a null for the tp_Assembly column for the web part. What is this web part you ask, well it is the Microsoft.Office.Server.Search.WebControls.SearchTopologyView web part
in the Microsoft.Office.Server.Search, Version=,
Culture=neutral, PublicKeyToken=71e9bce111e9429c

If you do a query to see where these 6 instance are:

select *
from AllWebParts
where tp_WebPartTypeId = '8D6034C4-A416-E535-281A-6B714894E1AA'

You will see that the web part exists on two pages:

  • SearchAdministration.aspx
  • SearchFarmDashboard.aspx

Open those pages, notice…It DOES exist!

Now, here is the funny thing – rerun the queries.  As soon as you open those pages, the databsae gets updated and the error will go away.  Weird!!!


SharePoint 2010 User Profile Properties (SubType) – Error

When creating a custom User Profile Property, be sure to check the "Default User Profile Subtype" checkbox.  If you don't you won't see the property on the manage properties page and won't be able to get to it through the UI.

However, I figured a way to get to it…just paste in the browser (to get your appid just click on another property to edit, then change the name query string):


And you will be able to get to it and check the checkbox

Another issue, when you click the "Add new mapping", if you don't select anything, it will add the "Select Attribute" to your mappings, this is obviously wrong and will not  make your ForeFront Sync happy.

Also note that after adding a  new property, your log will get several "Sync" errors for each site collection saying you don't have that property in the site!

[UPDATE] – In RTM, the checkbox will be checked by default…woohoo, now you just gotta hope the admins don't uncheck it!


SharePoint 2010 BDC Error

Sooo, I have this lovely app def file, that uploads perfectly.  But when I go to use one of the entities in a list column, I get this interesting issue (notice that I don't get columns, but the first named TypeDescriptor):


Fair enough, I'll remove the wrapper from around my return
columns from the query. This USE to work in 2007 by the way:

TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
….Column descriptors….

Re-upload, and whalla…it works like it did in 2007!


But, on adding an item with item resolution, you get this lovely error:

The root TypeDescriptor with Name 'Reader' belonging to Method with Name 'Find_Customers', of Entity with Name 'Customers' and Namespace 'Northwind' has a TypeName that is not assignable to System.Data.IDataReader or is not a Collection TypeDescriptor, which is necessary when using LobSystems of Type Database.

Fair enough, sooo, I go and change it in the app def file:

<TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Reader">

And on upload, you get this lovely error:

ReturnTypeDescriptor of MethodInstance with Name 'Find_Customers_Instance' on
Entity (External Content Type) with Name 'Customers' in Namespace 'Northwind'
should not be a Collection TypeDescriptor for MethodInstances of Type

Oh yeah baby…a catch 22 loop!!!  Anyone? Bueller?  Bueller?

It just keeps getting better doesn't it???


Microsoft Forefront Protection 2010 for SharePoint Beta 2

Not alot of people actually installed antivirus software on their SharePoint 2007 environments.  The unfortunate thing is, only Microsoft had something that would actually plug in (as far as I know anyway and I did a lot of research).  The only solution has been ForeFront security (NOTE: this is NOT the same thing as ForeFront Identity).  If you are on SharePoint 2007, you should know that they released SP3 of ForeFront security a few months ago, I just now found out which really shows you how important it is in the community (ie, not very).  You should download and install the new SP3!

One piece of software that you should start out testing and considering for your 2010 environment is the Microsoft Forefront Protection 2010 for SharePoint Beta 2.  It is also available for download from here.