Question

I'm sorry for my english. I'm trying to put a custom provider, but when I write in my SiteMapDataSource provider, nothing changes. When I change his ID and correspondingly changing its attributes in DataSourceID page gives an error that it is not. He remembered TopSiteMap ID and do not want to compile other.


Provider is registered in the web config and in other site collections working properly. But this one had a bug.

If the master page menu as described:
<SharePoint:AspMenu
      ID="TopNavigationMenuV4"
      Runat="server"
      EnableViewState="false"
      DataSourceID="topCrossSiteMap"
      AccessKey="<%$Resources:wss,navigation_accesskey%>"
      UseSimpleRendering="true"
      UseSeparateCss="false"
      Orientation="Horizontal"
      StaticDisplayLevels="1"
      MaximumDynamicDisplayLevels="3"
      SkipLinkText=""
      CssClass="s4-tn"/>
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
    <Template_Controls>
        <asp:SiteMapDataSource
          ShowStartingNode="False"
          SiteMapProvider="CrossSiteMapProvider"
          id="topCrossSiteMap"
          runat="server" />
    </Template_Controls>
</SharePoint:DelegateControl>

Throws an exception:

System.Web.HttpException: The DataSourceID of 'TopNavigationMenuV4' must be the ID of a control of type IHierarchicalDataSource. A control with ID 'topCrossSiteMap' could not be found.

And in the ULS in 2 milliseconds before requesting records without correletion ID have the following error when accessing the content database:

PermissionMask check failed. asking for 0x00010000, have 0x00000000

and

Access Denied. Exception: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.SharePoint.Library.SPRequestInternalClass.GetWebMetainfo(String bstrUrl)
at Microsoft.SharePoint.Library.SPRequest.GetWebMetainfo(String bstrUrl).

If the master page menu as described:
<SharePoint:AspMenu
      ID="TopNavigationMenuV4"
      Runat="server"
      EnableViewState="false"
      DataSourceID="topSiteMap"
      AccessKey="<%$Resources:wss,navigation_accesskey%>"
      UseSimpleRendering="true"
      UseSeparateCss="false"
      Orientation="Horizontal"
      StaticDisplayLevels="1"
      MaximumDynamicDisplayLevels="3"
      SkipLinkText=""
      CssClass="s4-tn"/>
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
    <Template_Controls>
        <asp:SiteMapDataSource
          ShowStartingNode="False"
          SiteMapProvider="CrossSiteMapProvider"
          id="topCrossSiteMap"
          runat="server" />
    </Template_Controls>
</SharePoint:DelegateControl>

Everything works without errors. But the menu is clearly using SPNavigationProvider.

And another detail: different faces of site collection displayed in different ways. (one dropped out error on the other nothing has changed) First thought that the problem in the object http.sys. Tried to restart the WFE servers. But it did not help.

Was it helpful?

Solution

I found the solution. But I could not find an explanation. Still the case in some species caching.


When I changed in DelegateСontrol both ID, the page is loaded without error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top