Feeds:
Posts
Comments

Archive for 2009

I was getting this error message in Visual Studio 2008 when adding a custom activity to an existing workflow.   Solution This worked for me, your mileage, may and probably will vary. It was necessary for me to un-gac the workflow project, then the custom activities could be added to the design surface as expected.

Read Full Post »

Ever get any of these errors? The DataSourceID of ‘TopNavigationMenu’ must be the ID of a control of type IHierarchicalDataSource.  A control with ID ‘topSiteMap’ could not be found.   at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource()    at System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource()    at System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e)    at System.Web.UI.Control.LoadRecursive()    at System.Web.UI.Control.LoadRecursive()    at System.Web.UI.Control.LoadRecursive()    at System.Web.UI.Control.LoadRecursive()    at System.Web.UI.Control.LoadRecursive()    at [...]

Read Full Post »

Okay so ever needed to see if a particular web or site feature is activated? Well if it’s activated it will be in the SPWeb.Features SPFeatureCollection or SPSite.Features. If it’s not activated it won’t be. Simple. To check if a feature is installed examine the feature definitions collection on the SPFarm object, below are a [...]

Read Full Post »

If you get this error message, which I did this morning opening up someone else’s SharePoint solution, make sure you have InfoPath installed.   Once I installed the InfoPath client application  with .Net Programmability Support, see below, the targets file was installed to the MSBuild directory.

Read Full Post »

Okay simple solution here: Make sure that if you are not the root SPWeb and you want to add custom role definitions i.e. SPRoleDefinitions call SPRoleDefinitionCollection.BreakInheritance(bool,bool)

Read Full Post »

There are lots of reasons this error message can occur, see: http://www.google.com/search?q=sharepoint+Server+Out+Of+Memory. In my case it happened when a new site was being provisioned using a custom site definition during the ApplyWebTemplate call. Turned out the there were subtle errors in my onet.xml. In particular I was referencing some document templates using an incorrect path:

Read Full Post »

Okay so its pretty easy to get the fully qualified domain name (FQDN). But what happens if you want to get the old-skool netbios name. The quickest way is to use System.Environment: This gets the network domain name associated with the current user. So not much good if your code is running as a service [...]

Read Full Post »

I always forget the name of the class that stores a great big list of field ID constants. So as a reminder to myself it’s SPBuildInFieldId For example: Whilst looking this up again I stumbled across another similar class SPBuiltInContentTypeId that holds content type id’s for the common OOTB content types, neat!

Read Full Post »

Okay so this one is filed under the “I keep looking up the same things” category. In .Net 1 lists of objects were commonly serialized either using an Array or an ArrayList property: In .net 2.0 List<T> can be serialized by adding the XmlArray attribute in the property declaration, as follows: …..

Read Full Post »

Today I had the requirement to include a link in the quick launch menu to the current web’s homepage. Agreed it’s a strange requirement, but nonetheless in this case it was arguably not too bad. However the default SPNavigationProvider does not display the homepage in the quick launch menu. In order to do this add [...]

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.