publishingweb

SharePoint PublishingWeb change under elevated security context fails, why?

I'm having trouble updating a SharePoint publishingWeb attribute under RunWithElevatedPrivileges. it fails with the exception "The security validation for this page is invalid" at this line : "pubWeb.IncludeInCurrentNavigation = false;". Below is the code i'm trying to run. Normally you can set AllowUnsafeUpdates = true, but publishingWe...

Sorting Navigation's Items from code (Sharepoint 2010)

Hey... I work in sharepoint 2010 and I want to sort Global Navigation's item from code(written in c#) Here is part of my function for sorting navigations items: PublishingWeb myPublishingWeb = PublishingWeb.GetPublishingWeb(site.OpenWeb()); SPNavigationNodeCollection publishingNavigationNodes = myPublishingWeb.Navigation.GlobalNavigati...