SharePoint Search Issues 'catalogs/DeviceChannelMappings.aspx' allows a limit of 11 - Sorry something went wrong the page allows a limit of 11 direct dependencies, and that limit has been exceeded

SharePoint Search Issues: The page ‘catalogs/DeviceChannelMappings.aspx’

No comments

Loading

In this “SharePoint Search Issues”  article I will show you how to fix the page ‘catalogs/DeviceChannelMappings.aspx’ allows a limit of 11 error in SharePoint 2016 – 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 on 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? Before fixing this issue, let us understand what is “catalogs/DeviceChannelMappings.aspx” in SharePoint 2016.

SharePoint Search Issues: Understanding “catalogs/DeviceChannelMappings.aspx” in SharePoint 2016

In SharePoint 2016, “catalogs/DeviceChannelMappings.aspx” is a page associated with the Device Channels feature. Device Channels allow SharePoint site owners and designers to render content differently based on the device accessing the site. This feature is particularly useful for creating responsive designs that provide optimized experiences for various devices such as desktops, tablets, and smartphones.

What is Device Channels?

Device Channels is a SharePoint feature that enables the creation of different views or layouts for the same content based on the device accessing the site. This is achieved by defining “channels” for different devices and specifying which master page and page layouts should be used for each channel.

Purpose of “catalogs/DeviceChannelMappings.aspx”

The “catalogs/DeviceChannelMappings.aspx” page is part of the configuration and management interface for Device Channels. It allows administrators to map devices to specific channels, helping ensure that the right layout is delivered to the right device. This page resides in the “Catalogs” directory of a SharePoint site, which typically contains various configuration and administrative pages.

How It Works

  1. Defining Device Channels:
    • Administrators define device channels based on user-agent strings that identify different devices or groups of devices.
    • Each channel can have its own master page and page layouts.
  2. Mapping Devices to Channels:
    • The “DeviceChannelMappings.aspx” page is used to configure which user-agent strings correspond to which device channels.
    • This mapping ensures that when a device accesses the site, SharePoint delivers the appropriate master page and layout.
  3. Rendering Content:
    • When a user visits the SharePoint site, SharePoint detects the device type using the user-agent string.
    • The site then applies the correct device channel settings, rendering the site using the designated master page and layout for that device.

Accessing Device Channel Mappings

To access and configure Device Channels in SharePoint 2016, follow these steps:

  1. Navigate to Site Settings:
    • Go to the root of your SharePoint site.
    • Click on the gear icon in the upper-right corner and select Site Settings.
  2. Go to Device Channels:
    • Under the Look and Feel section, click on Device Channels.
    • This will take you to a page where you can manage your device channels, including adding new channels or editing existing ones.
  3. Edit Device Channel Mappings:
    • To map devices to channels, you may need to access the “catalogs/DeviceChannelMappings.aspx” page directly or through the Site Settings interface.
    • Ensure that the mappings are correctly configured to align with the desired user-agent strings and device types.

Troubleshooting Common Issues

If you encounter issues with Device Channels, such as the error “The base type ‘Microsoft.Office.Server.Search.Internal.UI.SearchResultsLayoutPage’ is not allowed for this page. The page ‘catalogs/DeviceChannelMappings.aspx’ allows a limit of 11,” consider the following steps:

  1. Verify Page Layouts and Master Pages:
    • Ensure that the master pages and page layouts specified for each device channel are correctly configured and do not exceed any limits.
  2. Check Feature Activation:
    • Make sure that all necessary features related to Device Channels and page layouts are properly activated.
  3. Inspect User-Agent Strings:
    • Validate the user-agent strings used for device detection to ensure they accurately match the intended devices.
  4. Review Site Collection Health:
    • Check for any issues or corruption in the site collection that might affect the functionality of Device Channels.

By understanding the role of “catalogs/DeviceChannelMappings.aspx” and how Device Channels work in SharePoint 2016, administrators can better manage and optimize the rendering of content across different devices, ensuring a seamless user experience.

Solution: The page ‘catalogs/DeviceChannelMappings.aspx’ allows a limit of 11

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

If you insert more than 10 user controls on 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: The page ‘catalogs/DeviceChannelMappings.aspx’ allows a limit of 11

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: SharePoint Troubleshooting Articles

You may also like the below SharePoint troubleshooting articles:

Download SharePoint Online PDF Book

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.

 

About Post Author

Do you have a better solution or question on this topic? Please leave a comment