Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

SharePoint pages do not render when using unsafe controls


View products that this article applies to.

Symptoms

After you install one of the following updates, some SharePoint pages do not render, and generate error messages such as the following: 

↑ Back to the top


Cause

An allow list of ASP.NET controls is enforced in SharePoint 2010 and SharePoint 2013 after you install updates. If web parts or controls on the SharePoint pages are not added to the allow list, the pages do not render.

↑ Back to the top


Resolution

If the pages no longer render because they use a control that isn't in the SafeControls list, follow these steps:

  1. Review SharePoint Unified Logging Service (ULS) logs to find the 9s9ay tag or a message that contains "Blocking control with property" that indicates that a control is blocked.
  2. Identify the type, namespace, and assembly strong name from the error message. 
    • Example 1

    Given the following error message: 

    "The type Contoso.Customizations.WebPartControl, Contoso.WebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f8f11d50a3a could not be found or it is not registered as safe."

    Type = "WebPartControl"

    Namespace = "Contoso.Customizations"

    Assembly strong name = "Contoso.WebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f8f11d50a3a"

    • Example 2

    Given the following error message:

    "Blocking control with property traversal markup. [tagName: SharePoint:WebPartControl][propName: propName1][type: typeName1]"

    Type = "WebPartControl" (not "typeName1")

    You can find the namespaces and assembly data in Microsoft Docs by querying the type name.

  3. Add a new SafeControls element for the given type, namespace, and assembly strong name to the Web.config file under the configuration/SharePoint/SafeControls element, as described in SafeControls element (Solution), and then set the Safe attribute to TRUE.

For more information about the format of the attribute values in the SafeControls element, refer to the table in the step 12 in Marking Safe Controls in the Package Designer.

↑ Back to the top


Workaround

If you have many unsafe controls, you can work around this issue by following these steps:

  1. Edit the SafeMode element in the Web.config file under the configuration/SharePoint element.
  2. Add a ControlCompatMode attribute that has a value of True

↑ Back to the top


Keywords: unsafe web controls, controls not in safe controls list, sharepoint page fail to render

↑ Back to the top

Article Info
Article ID : 4572409
Revision : 21
Created on : 9/7/2020
Published on : 9/8/2020
Exists online : False
Views : 333