none
"This page allows a limit of 200 controls, and that limit has been exceeded." Error when modifying master page template RRS feed

  • Question

  • Hi

    I am working within Sharepoint Online. When making a modification to a Master Page template (adding a CSS stylesheet), my pages now get the following error: 

    "This page allows a limit of 200 controls, and that limit has been exceeded." 

    I have tried searching but am coming up blank - is there a page or site that documents what qualifies as a "control" or how this error can be resolved? 

    I am site collection administrator, so I don't have access to Central Admin or anything too deep in the backend. 

    Any info would be much appreciated.  

    Thanks!


    Tuesday, July 23, 2019 1:12 PM

All replies

  • There is no way other than doing at web app level. you have to open web.config file of the web application and if possible take the back of web.config file and open in the file in notepad or any text editor and then find the tag.

    <SafeMode MaxControls=”200″ CallStack=”false” DirectFileDependencies=”10″ TotalFileDependencies=”250″ AllowPageLevelTrace=”false”>

    and change the Max Controls to higher than 200, something like 2000, increase until it resolved your issue.

    Don't forget to reset IIS as well in all the web servers.

    Below article for your reference:

    https://www.c-sharpcorner.com/blogs/sharepoint-direct-dependencies-limit-with-master-page-user-controls1

    Thanks & Regards,


    sharath aluri

    Tuesday, July 23, 2019 1:47 PM
  • Hi,

    You can always change this count in web.config file, but I suggest you few more things before you do it.

    1. Take Web.config file backup

    2. Ensure that you have increased the number by 10% more than what you exactly need (for a safer side)

    3. Plan for better WFE servers to handle the load, as you are increasing the no.of controls to be rendered as part of master page

    4. Ensure that you updated web.config in all the WFE servers.

    5. Do a IIS Reset.

    Enjoy the SharePoint !!

    Best Regards,
    Krishna
    Please remember to mark the replies as answers if they helped.

    Tuesday, July 23, 2019 2:17 PM
  • Thanks Sharath! 

    I found articles on altering the web config as well. I am dealing with Sharepoint Online (forgive this question being logged under Sharepoint - Legacy - there were no O365 options available when creating the ticket), and I am only a site collection administrator. My guess is that I will need to work with Microsoft to have them make the adustment since we dont have direct access to the web server? 

    Wednesday, July 24, 2019 3:51 PM
  • I agree there is no way to display SharePoint Online while creating forum. If it's a SharePoint Online then you might have to work with Microsoft Support Team since they hold the above level access.

    Thanks & Regards,


    sharath aluri

    Wednesday, July 24, 2019 3:59 PM
  • Hi,

    Yes as Sharath advised.

    You can't edit web.config file for SPO, if you really want to make this change you should log a ticket.

    For this issue, you can create service request on office 365.

    Refer to the following article about how to create service requests to contact Office 365 support:

    https://blogs.technet.microsoft.com/praveenkumar/2013/07/17/how-to-create-service-requests-to-contact-office-365-support/

    Enjoy the SharePoint !!

    Best Regards,
    Krishna

    Please remember to mark the replies as answers if they helped.
    Wednesday, July 24, 2019 7:12 PM