After upgrade to TFS 2013 or after restoring a site collection, some web parts on the TFS Dashboard pages display an error

Error: The type Microsoft.TeamFoundation.WebAccess.WebParts.<NAME>, Microsoft.TeamFoundation.WebAccess.WebParts, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a could not be found or it is not registered as safe.

 

Cause: There is a missing <SafeControl> entry in the
web.config file for the SharePoint web application hosting the dashboard page

 

Workaround:

To confirm the issue:

  1. Locate the root web.config file for the SharePoint web application
  2. Confirm the file contains <SafeControl> entries for Microsoft.TeamFoundation.WebAccess.WebParts.* types for both v10 and v12, but not v11.
  3. Manually add the corresponding v11 <SafeControl> entries in the web.config file
  4. Refresh the TFS Dashboard page. If the controls start to display, then you’re on the right track.
  5. Undo the manual change.

 

To “deploy” the fix:

  1. Deactivate the “TswaV11” feature using the url for the web application. Wait for a while (5 mins) until the change is able to propagate to the web.config file for all servers in the farm.
  2. Deactivate the “TswaV12” feature and wait.
  3. Verify that the <SafeControl> v12 entries are removed from the web.config files on all the relevant SharePoint servers.
  4. Edit the following file: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\TswaV11\feature.xml
  5. Change the value to read: <Property Key="SafeControlVersion" Value="11.0.0.0" />
  6. Activate the “TswaV11” feature and wait. The v11 <SafeControl> entries should now be there.
  7. Activate the “TswaV12” feature and wait. The v12 <SafeControl> entries should now be there.
  8. Refresh the dashboard page and the original controls should be working now.

 

We are planning a product fix for this in future updates.