SharePoint security update causing issue

Athulya Pillai 46 Reputation points
2023-11-03T13:18:15.5566667+00:00

Hi Team,
I am getting below error when installing latest security sharepoint update-kb5002494,KB 5002501 of
SharePoint server 2016 on windows server 2019.

Application error when access /_layouts/15/settings.aspx, Error=The control type 'System.Web.UI.HtmlControls.HtmlImage' is not allowed on this page. at System.Web.UI.TemplateParser.ProcessError(String message) at System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)

I tried below, but did not help
$f=get-spfarm
$f.AddGenericAllowedListValue("WebPartSupportedBoundPropertyNames","data-title-text")
$f.AddGenericAllowedListValue("WebPartSupportedBoundPropertyNames","data-link-to-tab-text")
$f.update()

iisreset

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,223 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 13,185 Reputation points Microsoft Vendor
    2023-11-06T05:53:17.59+00:00

    Hi @Athulya Pillai,

    Thank you for posting in this community.

    The cause of the problem: An allow list of ASP.NET controls is enforced in SharePoint 2016 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.

    Solution:

    1.Find your web application's web.config file. The approximate path should be:

    the address of your installation:\inetpub\wwwroot\wss\VirtualDirectories\ the port number of your web applicaiton

    User's image

    2.Find the <SafeControls> tag and add the following to it:

    <SafeControl Assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="False" />
    

    You can refer to your other System.Web.UI.WebControls values for the values of Version and PublicKeyToken, just be consistent with them.

    User's image

    3.Save the file and restart IIS.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Athulya Pillai 46 Reputation points
    2023-11-20T10:17:47.7733333+00:00

    hi,

    Please give me aday time, Tomorrow i will provide you the update


  3. Gábor Nagypál 0 Reputation points
    2024-04-19T10:07:39.6733333+00:00

    We bumped into "The control type 'System.Web.UI.HtmlControls.HtmlAnchor' is not allowed on this page." error. The ULS log also contains this entry:

    Blocking control with property traversal markup. [tagName: a][propName: data-viewctr][type: SimplePropertyEntry]

    The following article describes how to add 'data-viewctr' to 'WebPartSupportedSimplePropertyNames' list:

    ASPX file cannot be displayed when you create a custom web part (KB5030804)

    The final version of our workaround script:

    $f=get-spfarm
    $f.AddGenericAllowedListValue("WebPartSupportedSimplePropertyNames","data-viewctr")
    $f.update()	
    IISRESET
    
    0 comments No comments