.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

SharePoint - Direct Dependencies Limit with Master page User Controls

Posted By:Sagar Pardeshi       Posted Date: May 23, 2014    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

SharePoint - Direct Dependencies Limit with Master page User Controls

 web site uses a large number of user controls hard coded across twenty-odd page layouts--a big no-no. While we've matured as a dev. team since this site launched and now fully appreciate the value of web parts and a small set of key page layouts, unfortunately the site is live as-is.


From a production support perspective we're still working on the site and adding new user controls here and there. This shouldn't be problematic but MOSS, in its infinite wisdom, limits the number of user controls on a page and fails when that limit is reached.

When developing large portals, it can often be a mistake. associated with exceeding limit inclusion in external objects, such as pages, .ascx files.


This problem can easily be corrected by editing the Web.config file. For this limit corresponds to the parameter DirectFileDependencies.



If you insert more than 10 user controls in a masterpage, you might get an error similar to this:

The page '/path/somefile.master' allows a limit of 11 direct dependencies, and that limit has been exceeded.

You can easily increase that limit as it is actually set in your sharepoint web.config:

Steps edit web.config

1)Browse to C:\inetpub\wwwroot\wss\VirtualDirectories\

2) Open the folder corresponding to your Sharepoint website.

3) Edit the file web.config

4) Do a search for "safemode".

5) Change the property DirectFileDependencies from 10 to a value your choice.

6) Do an iisreset command and you're done!



< SafeMode MaxControls = "200" CallStack = "true" DirectFileDependencies = "20" TotalFileDependencies = "50" AllowPageLevelTrace = "false" >


The solution is to simply increase the value to the desired value.


 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend