SafeControl Entries for the Federated Search Results WebPart not Added Automatically when the SharePoint Connector Feature Is Installed

Symptoms

SafeControl entries for the Federated Search Results WebPart have not been added successfully when the SharePoint Connector feature is installed.

A web part or webform control on this web part page cannot be displayed or imported because it is not registered on this site as safe

Cause

SharePoint requires that all custom Web Parts have an entry in the SharePoint site's web.config that marks the control as 'safe' for use. This step is normally performed by the SharePoint Connector installer, but in some cases it may fail to be configured automatically. See relevant bug report: CSI-642.

Resolution

Manually add the SafeControl entry to the root web.config of your SharePoint server(s):

  1. Open C:\Inetpub\wwwroot\wss\VirtualDirectories\80\web.config.
  2. Locate the <SafeControls> element and add the following child elements:

    For SharePoint 2007
    <SafeControl Assembly="Atlassian.Confluence.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96f82bd35ec392e7" Namespace="Atlassian.Confluence.SharePoint.UI.WebControls.WebParts" TypeName="*" Safe="True" />
    <SafeControl Assembly="Atlassian.Confluence.SharePoint.Version2007, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96f82bd35ec392e7" Namespace="Atlassian.Confluence.SharePoint.Version2007.WebParts" TypeName="*" Safe="True" />
    
    For SharePoint 2010
    <SafeControl Assembly="Atlassian.Confluence.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96f82bd35ec392e7" Namespace="Atlassian.Confluence.SharePoint.UI.WebControls.WebParts" TypeName="*" Safe="True" />
    <SafeControl Assembly="Atlassian.Confluence.SharePoint.Version2010, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96f82bd35ec392e7" Namespace="Atlassian.Confluence.SharePoint.Version2010.WebParts" TypeName="*" Safe="True" />
    
  3. If that does not help, un-install/re-install the SharePoint Connector feature and repeat the above step.

Still not working?

  1. Check out SharePoint Site Collection's Web Part Gallery and examine the XML snippet for the Confluence Federated Search Results Web Part. To do this, go to _catalogs/wp/ConfluenceFederatedResultsWebPart.webpart in root SharePoint site. A correct output should be:

    <?xml version="1.0" encoding="utf-8" ?>
      <webParts>
        <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
        <metaData>
        <type name="Atlassian.Confluence.SharePoint.Version2007.WebParts.ConfluenceFederatedResultsWebPart, Atlassian.Confluence.SharePoint.Version2007, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96f82bd35ec392e7" />
        <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
      </metaData>
      <data>
        <properties>
          <property name="Title" type="string">Confluence Federated Search Results WebPart</property>
          <property name="Description" type="string">Displays search results from searches issued to Confluence. Note that this custom WebPart is not required when using SSO.</property>
        </properties>
      </data>
     </webPart>
    </webParts>
    
  2. If it does not match, browse to _catalogs/wp/Forms/AllItems.aspx in root SharePoint site and upload the attached ConfluenceFederatedResultsWebPart.webpart to the Web Part Gallery (make sure 'overwrite existing files' is selected). Note that this has to be performed for every SharePoint Site Collection that has the SharePoint Connector installed. Finally, reset IIS.

Powered by Confluence and Scroll Viewport