tag:blogger.com,1999:blog-9049032025342264339.post6998585390207816417..comments2024-03-29T01:06:25.773+03:00Comments on sadomovalex's blog: Cross-site and cross-site collection navigation in Sharepoint - part 2: publishing sitesAlexey Sadomovhttp://www.blogger.com/profile/18112105989691733410noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-9049032025342264339.post-80888882062038293342011-12-13T01:39:42.624+04:002011-12-13T01:39:42.624+04:00Cache can't be used here because otherwise it ...Cache can't be used here because otherwise it will affect all users, while different users may have different permissions and nodes will be trimmed differently. That's why we need to use some user specific storage here.Alexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-79646052941087183472011-12-01T11:28:37.951+04:002011-12-01T11:28:37.951+04:00Hi Mike,
thanks for noticing this problem. Probabl...Hi Mike,<br />thanks for noticing this problem. Probably instead of Session I used Cache or some custom serialization mechanism in the application - don't remember now. But yes, you should definitely add some caching here in order to avoid performance impact. You can check by yourself - add breakpoint to the BuildSiteMap() method and check how many times it is called on each postback. I Alexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-79642482533381231042011-12-01T03:16:35.429+04:002011-12-01T03:16:35.429+04:00Hey Alex,
It was the BuildSiteMapCode that was the...Hey Alex,<br />It was the BuildSiteMapCode that was the problem. See below. When I removed the session caching, it works. Guess this will be a significant performance hit. Maybe there is another way to persist, but for some reason SiteMapNode does not like to be serialized... Maybe JSON is the way.<br />Thanks again for the idea and post!<br />Mike<br /><br />public override SiteMapNode Mikehttps://www.blogger.com/profile/14234656893935779558noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-58712354743503064332011-12-01T00:41:12.233+04:002011-12-01T00:41:12.233+04:00Hey Alex,
really cool idea and thanks for posting ...Hey Alex,<br />really cool idea and thanks for posting it, but I'm getting an error.<br />System.Runtime.Serialization.SerializationException: Type 'System.Web.SiteMapNode' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.<br />Any ideas?<br />Thanks,<br />MikeMikehttps://www.blogger.com/profile/14234656893935779558noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-31921345228893557372011-11-30T13:01:40.219+04:002011-11-30T13:01:40.219+04:00EC,
I don't know your case, but as I already w...EC,<br />I don't know your case, but as I already wrote, note that SPWeb.Navigation which your are referring supposed to be used with non-publishing sites. For publishing sites there is another property PublishingSite.Navigation which returns instance of PortalNavigation (not SPNavigation which you mentioned). Also note that navigation is publishing sites is more complicated. Technically you Alexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-64786859443003366242011-11-30T11:44:57.031+04:002011-11-30T11:44:57.031+04:00Hello.
Alex, why we cannot use web.navigation.glo...Hello. <br />Alex, why we cannot use web.navigation.globalnodes ?<br /><br />http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigation.globalnodes.aspx<br /><br /><br />Why we cannot just create proper web and use web.Navigation.GlobalNodes?<br />Do you know any restrictions why not to use this property?OrionMasterhttps://www.blogger.com/profile/03163229565679336896noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-82169669318962112942011-11-29T15:47:13.573+04:002011-11-29T15:47:13.573+04:00EC,
as it said in the post, with standard API you ...EC,<br />as it said in the post, with standard API you can override navigation behavior for non-publishing sites. For publishing sites you can't do it with API. The reasons are described above.Alexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-61358975275413608152011-11-29T14:24:06.585+04:002011-11-29T14:24:06.585+04:00Why not to use default sharepoint API. For what re...Why not to use default sharepoint API. For what reason you added this webservice?OrionMasterhttps://www.blogger.com/profile/03163229565679336896noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-8948254620408314212011-03-09T21:29:46.770+03:002011-03-09T21:29:46.770+03:00Jonny,
I would use standard ASP.Net cache for that...Jonny,<br />I would use standard ASP.Net cache for thatAlexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-88651036808560894802011-03-09T20:34:03.786+03:002011-03-09T20:34:03.786+03:00"But from other side you should be very caref..."But from other side you should be very careful with performance: you should check that you don’t perform web service call each time when your site is requested."<br /><br />How exactly would you go about limiting the calls to the web service?Jonnyhttps://www.blogger.com/profile/02642615032820812586noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-71816725958763655742011-01-25T17:55:44.772+03:002011-01-25T17:55:44.772+03:00Steve,
thanks for sharing real life case )Steve,<br />thanks for sharing real life case )Alexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-83171828250105866002011-01-25T17:15:54.637+03:002011-01-25T17:15:54.637+03:00"You can call external web server from separa..."You can call external web server from separate web server and use navigation data from it (although currently I hardly can imagine the useful application of this abaility :) )"<br /><br />a real life application of this is a project I worked on. The customer has near 250 portals (for each branch, geographic site, HQ, business type, etc.).<br />Each of these portals and a "global&Steve B.https://www.blogger.com/profile/07607234139050671620noreply@blogger.com