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.


Comments (2)

  1. Jared says:

    Hi Trevor,

    When attempting to Deactivate the features, I get the following error:

    Access denied.  Only machine administrators are allowed to create administration service job definitions of type: Microsoft.TeamFoundation.SharePoint.WebAccess.ApplyWebConfigModificationsJobDefinition, Microsoft.TeamFoundation.SharePoint.WebAccess, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

    Both myself and the service account I'm using are Farm Administrators.

    Any suggestions?

  2. Michael Andy Poulsen says:

    Hello,

    Is this problem fixed in 2013.4?

    I have a server that I have migrated from 2012 to 2013.4 on new hardware.

    I get errors like this:

    Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type Microsoft.TeamFoundation.WebAccess.WebParts.QueryResultsWebPart, Microsoft.TeamFoundation.WebAccess.WebParts, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a could not be found or it is not registered as safe. Correlation ID: 8bb1df9c-8eb3-303e-0000-02ab8382798b.

    Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type Microsoft.TeamFoundation.WebAccess.WebParts.WorkItemSummaryWebPart, Microsoft.TeamFoundation.WebAccess.WebParts, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a could not be found or it is not registered as safe. Correlation ID: 8bb1df9c-8eb3-303e-0000-02ab8382798b.

    Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type Microsoft.TeamFoundation.WebAccess.WebParts.CompletedBuildsWebPart, Microsoft.TeamFoundation.WebAccess.WebParts, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a could not be found or it is not registered as safe. Correlation ID: 8bb1df9c-8eb3-303e-0000-02ab8382798b.

    Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type Microsoft.TeamFoundation.WebAccess.WebParts.RecentCheckinsWebPart, Microsoft.TeamFoundation.WebAccess.WebParts, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a could not be found or it is not registered as safe. Correlation ID: 8bb1df9c-8eb3-303e-0000-02ab8382798b.

    There are not  <SafeControl> entries for Microsoft.TeamFoundation.WebAccess.WebParts.*

    And there is no C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATEFEATURESTswaV11 folder.

    Is this the same problem as the one described in this post?