Symptoms

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

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

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.

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.

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.

Caution: We don't recommend this workaround because it allows unsafe ASP.net controls to be run.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Any additional feedback? (Optional)

Thank you for your feedback!

×