SharePoint 2010 三级导航在 AppPool 回收和/或刷新对象缓存时消失
我遇到一个问题,即三级导航在发布 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试增加 web.config 中
DynamicChildLimit
的值。http://msdn.microsoft.com /en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.dynamicchildlimit.aspx
这将在声明导航提供程序的行中提到,例如
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
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.我解决了类似的问题:在 PortalSiteMapDataSource 控件中,我将 SiteMapProvider 属性从
CurrentNavigation
到CurrentNavSiteMapProvider
。I resolved a similar problem: in PortalSiteMapDataSource control I changed the SiteMapProvider attribute from
CurrentNavigation
toCurrentNavSiteMapProvider
.