Sharepoint 2013 master page related error

本文解决了SharePoint中因页面依赖超过限制导致的错误。一是调整web.config文件中的DirectFileDependencies值;二是移除SharePoint Designer添加的不兼容属性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Error: The page '/_catalogs/masterpage/__DeviceChannelMappings.aspx' allows a limit of 11 direct dependencies, and that limit has been exceeded.
I was getting this error when I try to access my SharePoint site after deploying our latest master page.

Unexpected    System.Web.HttpException: The page '/_catalogs/masterpage/__DeviceChannelMappings.aspx' allows a limit of 11 direct dependencies, and that limit has been exceeded.

The reason for this error turns out to be the number of controls allowed on the page is exceeded the limit specified. This limit is specified in the web.config file as:

<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="250" AllowPageLevelTrace="false">
   <PageParserPaths>
   </PageParserPaths>
</SafeMode>

By default the DirectFileDependencies limit is set to 10. Increasing the value as required will fix the issue.


ErrorCannot convert type 'Microsoft.SharePoint.WebControls.CssRegistration' to 'System.Web.UI.IAttributeAccessor'


I was getting this error after I edit my master page using SharePoint designer. When I go through the edited masterpage file, I noticed that there are some additional attributes added to some elements: __designer:Preview and __designer:Values.

<SharePoint:CssRegistration name="&lt;% $SPUrl:~sitecollection/_catalogs/masterpage/styles/Master. ...
  __designer:Preview="&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/_c...
  __designer:Values="&lt;P N=&#39;Name&#39; Bound=&#39;True&#39; T=&#39;SPUrl:~sitecollection/_cat...
<SharePoint:CssRegistration name="&lt;% $SPUrl:~sitecollection/_catalogs/masterpage/styles/Grid.cs...
  __designer:Preview="&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/_c...
  __designer:Values="&lt;P N=&#39;Name&#39; Bound=&#39;True&#39; T=&#39;SPUrl:~sitecollection/_cat...

To fix the issue, I had to search the whole master page file for __designer:Preview and __designer:Values attributes and remove them. So for the above example correct tag should be:

<SharePoint:CssRegistration name="&lt;% $SPUrl:~sitecollection/_catalogs/masterpage/OACCAC/styles/Master.css %&gt;" runat="server" after="SharepointCssFile"/>
- See more at: http://onlinecoder.blogspot.com/2013/06/sharepoint-2013-masterpage-related.html#sthash.J497cEfS.dpuf
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值