Raghu's SharePoint Column : SharePoint - My Lifeline!!

Raghu's SharePoint Column

Parser Error: Direct Dependencies and The Limit Has Been Exceeded

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The page ‘/sites/blah/_catalogs/masterpage/blah.master’ allows a limit of 11 direct dependencies, and that limit has been exceeded.

During deploying user control on the master page, in one of our project I used to get the above error. Generally such kind of exception is thrown will rendering a page. The reason behind this is the number of controls allowed on the page to render exceeds the limit specified in the web.config file

The solution of this problem can be fixed in two different ways.
Solution 1: Modify the control dependencies in the web.config file.
Solution 2: Optimize the usage of controls on the master page; this can be done either by deleting the duplicates, or integrating 2 or more control in one control.
The solution 2 is a complex one, where as the solution 1 is a simple modification as show below

Search for the following tag in the web config file and chage the DirectFileDependecies


By default the DirectFileDependecies will be set to 10, you can change to any limit u require.

 
Comments

Thanks,
It was so helpful

Leave a Reply
*

Protected by WP Anti Spam