Sorry something went wrong the page allows a limit of 11 direct dependencies, and that limit has been exceeded

[Fixed]: The page ‘catalogs/DeviceChannelMappings.aspx’ allows a limit of 11

No comments

 4,252 total views,  6 views today

I was fixing the SharePoint 2016 search issue where I was getting the below error while searching anything in the SharePoint 2016 search box:

“The base type ‘Microsoft.Office.Server.Search.Internal.UI.SearchResultsLayoutPage’ is not allowed for this page. The type Microsoft.Office.Server.Search.Internal.UI.SearchResultsLayoutPage, Microsoft.Office.Server.Search, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c could not be found or it is not registered as safe.”

Sorry something went wrong in SharePoint 2016 people search
Sorry something went wrong in SharePoint 2016 people search

Then got some solutions from Google, where it was mentioned we need to add the below entries in the web. config file of the issued particular web application:

<SafeControls> <SafeControl Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.Search.Internal.UI" TypeName="*" Safe="True" /> </SafeControls> 
<PageParserPaths> 
<PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="True" IncludeSubFolders="true" /> 
</PageParserPaths>

Once I added the above entry to the web. config file, it triggered another issue

Sorry, something went wrong
The page '/_catalogs/masterpage/__DeviceChannelMappings.aspx' allows a limit of 11 direct dependencies, and that limit has been exceeded.

Then, how to fix this issue?

Solution:

The above problem easily can be fixed by editing the web. config file.

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

The page ‘/_catalogs/masterpage/__somefile.aspx’ allows a limit of 11 direct dependencies, and that limit has been exceeded.

We can easily increase this “DirectFileDependencies” limit from the SharePoint web. config file.

Steps to edit web.config file in SharePoint

  1. Browse to C:\inetpub\wwwroot\wss\VirtualDirectories\ (in Web Front End Server)
  2. Open the folder corresponding to your Sharepoint web application.
  3. Edit the web. config file.
  4. Search for the text “safemode“.
  5. Change the property DirectFileDependencies from 10 to a value your choice, here I have changed the value from 10 to 20, the default value is 10.
<SafeMode MaxControls = "200" CallStack = "true" DirectFileDependencies = "20" TotalFileDependencies = "50" AllowPageLevelTrace = "false" >

6. Perform an iisreset command and that’s it, the issue will be fixed.

Summary

Thus, in this article, we have learned about how to fix the “The page ‘/_catalogs/masterpage/__somefile.aspx’ allows a limit of 11 direct dependencies, and that limit has been exceeded.”

See Also

You may also like the below SharePoint troubleshooting articles:

Download SharePoint Online & Office 365 Administration eBook

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:



Buy SharePoint Online & Office 365 Administration eBook


 

Get the free demo PDF eBook from here:

FREE DOWNLOAD

Send download link to:

Subscribe to get exclusive content and recommendations every month. You can unsubscribe anytime.