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.
Error: Cannot 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="<%
$SPUrl:~sitecollection/_catalogs/masterpage/styles/Master. ...
__designer:Preview="<link rel="stylesheet" type="text/css" href="/_c...
__designer:Values="<P N='Name' Bound='True' T='SPUrl:~sitecollection/_cat...
<SharePoint:CssRegistration name="<%
$SPUrl:~sitecollection/_catalogs/masterpage/styles/Grid.cs...
__designer:Preview="<link rel="stylesheet" type="text/css" href="/_c...
__designer:Values="<P N='Name' Bound='True' T='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="<%
$SPUrl:~sitecollection/_catalogs/masterpage/OACCAC/styles/Master.css %>" runat="server" after="SharepointCssFile"/>
No comments:
Post a Comment