Shawn Cicoria - CedarLogic

Perspectives and Observations on Technology

Recent Posts

Sponsors

Tags

General





Community

Email Notifications

Blogs I Read

Archives

Other

Use OpenDNS

January 2009 - Posts

Setting Navigation properties on a SharePoint (WSS) Site…

Recently, I was going through setting up some sample navigation approaches for SharePoint.  The first step was in creating a bunch of Child Sites and some basic hierarchical structure. For that I used a great tool from IDevFactory called SWAT just to create some empty Team Sites. 

The one issue with that tool is it doesn’t allow setting a few options globally.

What I wanted was to have under the Navigation options to have the “Show Subsites” enabled.  In addition to a few other navigation settings.  Just as shown below:

image

 

To do that you need to access the AllProperties collection on the SPWeb object and add or update any existing entries.  What I came up with is the following:

private static void SetNavigation(SPWeb childWeb)
 {
     if (childWeb.IsRootWeb == false)
     {
         SPNavigation spNav = childWeb.Navigation;
         childWeb.Navigation.UseShared = true;
         childWeb.Description = childWeb.Name + " description...";
 
         SetAllPropr(childWeb, "__IncludeSubSitesInNavigation", "True");
         SetAllPropr(childWeb, "__InheritCurrentNavigation", "False");
         SetAllPropr(childWeb, "__IncludePagesInNavigation", "False");
         SetAllPropr(childWeb, "__NavigationShowSiblings", "False");
         SetAllPropr(childWeb, "__NavigationOrderingMethod", "2");
     }
 }
 
 static void SetAllPropr(SPWeb web, string key, object value)
 {
 
     if (web.AllProperties.Contains(key))
         web.AllProperties.Remove(key);
 
     web.AllProperties.Add(key, value);
 }
 

The full standalone console project is located here

Posted: 01-24-2009 12:01 PM by cicorias | with no comments |
Filed under: ,
What’s my WSS/MOSS patch level?

For a good list on what your current farm patch level is at check out the following post:

http://www.mindsharpblogs.com/penny/articles/481.aspx

Just navigate to Central Administration –> Servers in Farm and look at the version reported.

Posted: 01-16-2009 2:36 PM by cicorias | with no comments
Filed under:
A little bit more on the issue with “Not enough storage is available to complete the operation”

OK.  When the …\User Agent\Post Platform key (explained in the prior post) has too many items and the total length exceeds 260 characters, what happens is the javascript function windows.navigator.userAgent reports back as MSIE 6.0.

As follows – using the http://www.fiddlertool.com/ua.aspx test page:

With a HTTP_USER_AGENT string exceeding 260 characters:

image

getComponentVersion says you are running Internet Explorer 7,0,6001,18000.

window.navigator.userAgent: [Mozilla/4.0 (compatible; MSIE 6.0)]
window.navigator.appMinorVersion: [0]

 

With a string less than 260 characters

image

getComponentVersion says you are running Internet Explorer 7,0,6001,18000.

window.navigator.userAgent: [Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 1.1.4322; WWTClient2; .NET CLR 3.5.30729; .NET CLR 3.0.30618; Zune 3.0; MS-RTC LM 8; OfficeLivePatch.0.0)]
window.navigator.appMinorVersion: [0]

Posted: 01-16-2009 2:15 PM by cicorias | with no comments
Filed under:
Adding Web Parts via IE 7 and the “Not enough storage is available to complete this operation” javascript Error Message…

Recently, installed a bunch of new Windows Live components such as Messenger, etc.

That update extended my HTTP_USER_AGENT string to beyond 260 characters, which unfortunately IE then, when asked via javascript, reports itself back as IE 6 – this causes the Modal dialog boxes in SharePoint for things like adding web parts to zones to report a message that “Not enough storage is available to complete this operation”.

So, since this is an x64 machine, I need to trim down the string which is taken from the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform

My key was the following:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 1.1.4322; WWTClient2; .NET CLR 3.5.30729; .NET CLR 3.0.30618; Zune 3.0; MS-RTC LM 8; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)

For now, I’ll take out the OfficeLiveConnector (which I’m NOT using now) from the AG

Posted: 01-15-2009 12:38 PM by cicorias | with no comments
Filed under:
Roger Lamb updates some guidance on SharePoint and Dispose…

If you’re doing WSS/MOSS development then you need to understand the implications of when to Dispose and not Dispose of your objects from the SharePoint object model.  Roger Lamb has been keeping us all up to date and I’m sure there’s more forthcoming…

http://blogs.msdn.com/rogerla/archive/2009/01/14/try-finally-using-sharepoint-dispose.aspx

Posted: 01-14-2009 3:39 PM by cicorias | with no comments
Filed under: ,
Welcomed updates to VSeWSS – now x64 support

If you’ve been running x64 WSS/MOSS in development VSeWSS has been a challenge (wouldn’t install – albeit I believe the Bamboo solutions folks had some hack…)

Now, the CTP of VSeWSS 1.3 has been announced

SharePoint Team Blog

CTP Preview of VSeWSS

Key capabilities in 1.3

  • The extensions now install on x64 bit OS. Visual Studio 2008 and SharePoint must be already installed.
  • Command Line Build option for TFS and MSBuild integration
  • Separate WSP Package and Retract commands. You can now build the WSP without deploying it
  • SPSolGen to Support Exporting from Content Management Publishing Sites
  • New Item Template for RootFiles Deployment
  • Automatically Remove conflicting existing features on development SharePoint server
  • WSP View New Feature Dialog Improvements: scope, receiver checkbox, element checkbox
  • WSP View can now be used to merge features and it blocks site features being merged into web features
  • Allow adding separate binary files such as Workflow assemblies
  • Some refactoring allowing for Web Part renaming and removing lines from feature.xml Item Removed
  • Allow selection of GAC or BIN deployment for Web Part Project not including CAS generation
  • Increase visibility of hidden features that VSeWSS creates
  • Add fast update deploy for DLL only or file only changes to solutions
  • Numerous Bug Fixes and improvements to error messages
Posted: 01-13-2009 5:17 AM by cicorias | with no comments
Filed under:
Live Messenger and AVG (Grisoft) Anti-Virus Issue 8100030d

If you’re running Grisoft AVG with Web Shield and trying the new Windows Live Messenger you might be experiencing connection issues.

For me disabling the Web Shield MSN Messenger protection worked…

Posted: 01-10-2009 5:51 AM by cicorias | with no comments
Filed under: