Why We Don't Use 32bit SharePoint Configurations
21. March 2007 07:01
Eric Charran has a post which illustrates yet another reason we don't utilize 32bit configurations for our MOSS installs.

http://blogs.msdn.com/echarran/archive/2007/03/19/3gb-switch-and-wss-2-0-3-0-moss.aspx



Tags: Comments (0) | Permalink
Traverse Site Hierarchy to Configure Inheritance
21. March 2007 06:57
If you need to reconfigure an entire hierarchy of SPWeb inheritance properties, for navigation, master pages, or page layouts, go ahead and try something like this recursive function I'm using to iterate through all child SPWebs and enable navigation inheritance.  See my previous post if your not sure how to get your SPWeb in the first place.

        private void FixRecursive( SPWeb myWeb)

        {

            foreach ( SPWeb web in myWeb.Webs)

            {

                FixRecursive(web);

                PublishingWeb pweb = PublishingWeb .GetPublishingWeb(web);

                pweb.InheritCurrentNavigation = true;               

                pweb.Update();

            }

        }


As a side note, this snippet is from a utility that does a variety of publishing related fixes/tasks which I have been working on for the past month.  Hopefully I'll be able to get the utility itself up on the blog within the next few weeks.
Tags: Comments (0) | Permalink
Open a SPWeb object to a load balanced farm
19. March 2007 05:56
I was working on some quick utilities to address some upgrade bugs in Sharepoint 2007, and ran across some problems opening connections to a load balanced farm via the object model.

Here is a way that works, if you've got something better let me know!

           SPWebService myWebService = SPWebService .ContentService;

            SPWebApplication myWebApp = myWebService.WebApplications[ "web app name" ];

            SPSite mySite = myWebApp.Sites[BaseURL];

            SPWeb myWeb = mySite.OpenWeb();

Where 'web app name' is the name of the web app as you see it in IIS.  (e.g. "SPS Portal - 80")

Tags: Comments (0) | Permalink