SharePoint 2010 三级导航在 AppPool 回收和/或刷新对象缓存时消失

发布于 2024-11-14 15:33:33 字数 1087 浏览 1 评论 0原文

我遇到一个问题,即三级导航在发布 SharePoint 2010 网站上随机消失。我可以通过回收应用程序池或刷新对象缓存来重现消失。这似乎是一个缓存问题,因为导航提供商确实使用缓存来提高性能。一旦菜单消失,我只需转到 SPWeb 的导航设置并更改节点的顺序即可将其恢复。这似乎使缓存失效并且菜单再次出现。

下面是 Portalsitemapdatasource 和 aspmenu 元素的片段。

    <publishingnavigation:portalsitemapdatasource id="mapThirdLevelNavigation" runat="server"
        sitemapprovider="CurrentNavigation" enableviewstate="false" startfromcurrentnode="true"
        startingnodeoffset="1" showstartingnode="false" TreatStartingNodeAsCurrent="False" />

    <sharepoint:aspmenu id="mnuBottomNavigation" runat="server" datasourceid="mapTopNavigation"
        enableviewstate="false" accesskey="<%$Resources:wss,navigation_accesskey%>"
        orientation="Horizontal" maximumdynamicdisplaylevels="0" dynamichorizontaloffset="0"
        staticpopoutimagetextformatstring="" skiplinktext="" staticsubmenuindent="0"
        cssclass="bottom-topNavContainer" />

谷歌并没有提供太多帮助,因此非常感谢您提供的任何帮助。

编辑:刚刚注意到我不需要更改菜单项重新出现的节点顺序,只需加载 SPWeb 对象的 _layouts/AreaNavigationSettings.aspx 页面就可以了。它看起来更像是缓存问题。

I've got an issue where the tertiary level navigation randomly disappears on a publishing SharePoint 2010 site. I can reproduce the disappearance by recycling the app pool or flushing the object cache. It seems like it is a caching issue as the navigation providers do use caching for performance. Once the menu disappears, I can get it back by simply going to the navigation settings for the SPWeb and changing the order of the nodes. This seems to invalidate the cache and the menu appears again.

Below is a snippet of the portalsitemapdatasource and aspmenu elements.

    <publishingnavigation:portalsitemapdatasource id="mapThirdLevelNavigation" runat="server"
        sitemapprovider="CurrentNavigation" enableviewstate="false" startfromcurrentnode="true"
        startingnodeoffset="1" showstartingnode="false" TreatStartingNodeAsCurrent="False" />

    <sharepoint:aspmenu id="mnuBottomNavigation" runat="server" datasourceid="mapTopNavigation"
        enableviewstate="false" accesskey="<%$Resources:wss,navigation_accesskey%>"
        orientation="Horizontal" maximumdynamicdisplaylevels="0" dynamichorizontaloffset="0"
        staticpopoutimagetextformatstring="" skiplinktext="" staticsubmenuindent="0"
        cssclass="bottom-topNavContainer" />

Google hasn't been very helpful so any assistance provided is very much appreciated.

Edit: Just noticed that I didn't need to change the order of the nodes for the menu items to reappear, just loading the _layouts/AreaNavigationSettings.aspx page for the SPWeb object does the trick. It's looking even more like a cache issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不必了 2024-11-21 15:33:34

尝试增加 web.config 中 DynamicChildLimit 的值。

http://msdn.microsoft.com /en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.dynamicchildlimit.aspx

这将在声明导航提供程序的行中提到,例如

add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider"
    NavigationType="Current" EncodeOutput="true" />

DynamicChildLimit,它是一个整数属性,指定每个网站的最大“动态”子级(动态子级包括子网站和页面)。该值默认为 50,因此,如果特定网站的子网站和页面数量大于 50 个对象,则将忽略该对象,除非您调整此设置。这个限制可以增加,但请记住导航层次结构的可用性,因为每个枢轴都有很多子项。

Try increasing the value of DynamicChildLimit in web.config.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.dynamicchildlimit.aspx

This will be mentioned in a line where Navigation Provider is declared such as

add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider"
    NavigationType="Current" EncodeOutput="true" />

DynamicChildLimit, which is an integer property that specifies the maximum "dynamic" children for each Web site (dynamic children include subsites and pages). This value defaults to 50 so if the number of subsites and pages for a particular Web site is greater than 50 objects will be left out unless you adjust this setting. This limit can be increased but keep in mind the usability of a navigation hierarchy that has so many children at each pivot.

成熟稳重的好男人 2024-11-21 15:33:34

我解决了类似的问题:在 PortalSiteMapDataSource 控件中,我将 SiteMapProvider 属性从CurrentNavigationCurrentNavSiteMapProvider

I resolved a similar problem: in PortalSiteMapDataSource control I changed the SiteMapProvider attribute from CurrentNavigation to CurrentNavSiteMapProvider.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文