Tag Archives: bug

An error occured while validating or updating the directory service connection. No update was performed.

I got this error whilst trying to get User Profiles to work. Things to check:


  1. Domain name is correct
  2. If using custom sources, try creating a new custom source and deleting the old one
Tagged , ,

SharePoint custom workflow activity. “Failed to load toolbox item. It will be removed from toolbox.”

I was getting this error message in Visual Studio 2008 when adding a custom activity to an existing workflow.



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.

Tagged , , , , ,

Server Out Of Memory – There is no memory on the server to run your program. Please contact your administrator with this problem. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)

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:

<Project Title="$Resources:onet_TeamWebSite;" xmlns="http://schemas.microsoft.com/sharepoint/"  Revision="2" ListDir="$Resources:core,lists_Folder;" xmlns:ows="Microsoft SharePoint">
    <DocumentTemplate Path="INCORRECTPATH" Name="" 
Tagged , ,

Visual Studio 2008 SP1 Crashes when exiting the application, in module ModName:msenv.dll

After recently increasing my monitor setup to 3 flat screens! I decided to embark on the ultimate 2-window Visual Studio layout, docking most of my non-text editor windows on monitor 2. After lots of precision placements of windows, I thought I had better close Visual Studio so that it saves my new layout. Well fat chance!

Visual Studio threw up the depressing “Microsoft Visual Studio has encountered a Problem and needs to close.”

Microsoft Visual Studio has encountered a problem and needs to close


For a laugh I decided to fire off the error report via the “Send Error Report” button. The subsequent confirmation button had a link on it which I almost missed.

Visual Studio 2008 Send Error Report


Clicking on this link took you to a rather generic looking Windows Error Reporting page:

Windows Error Reporting Page

However out of curiosity I followed the link to the KB article, expecting it to be next to useless in solving my issue. However imagine my surprise when the article was 100% relative!

KB 960075 Fixes issues with Visual Studio 2008 SP1 IDE crashes when changing the window layout. Hooray for Windows Error reporting, it actually works {on incredibly rare occasions}.


UPDATE: I ended up reading the comments on http://code.msdn.microsoft.com/KB960075 before installing the hotfix and “Window->Reset Window Layout” fixed the crashes for me. In the end I didn’t bother to install the hot fix.


2nd UPDATE: Okay so I *DID* have to install it in the end, and it worked fine.

Tagged , ,

Target Audience property not displaying / missing for web parts

I came across this problem on a web application that had been working fine, then all of a sudden the “Target Audiences” property disappeared from the web part tool pane.


To solve this problem I re-associated the web application with the Shared Service Provider (SSP) and bounced IIS.

1. Web applications are associated with SSP’s in central administration. Select Shared Services Administration

sharepoint central administration


2.  Select Change Associations

sharepoint central administration manage farm shared services


3. Select the web application you are having problems with, and select OK to complete the process.

sharepoint central administration change association between web applications and ssps

4. Perform a  complete IISReset.

Then the property miraculously reappeared – hooray!

Pages - AllCounterParties - Mozilla Firefox (3) ITS BACK!!


During investigating this issue I found the class responsible for rendering this section of the tool was an internal class WebPartToolPartAdvanced. I you really get stuck and my method doesn’t cut it you could dig around in that class and see if you can find anything that helps.

Tagged , , , ,

SPUtility.DateParse !♥ seconds: SPUtility.DateParse removes the time component if you parse a date that incudes seconds!??!

Okay here’s another baffling API bug:

If you parse a date using SPUtility.ParseDate(web, “11/29/2009 13:37:12”, SPDateFormat.DateTime, false) it will return you a date object without parsing the time!

Remove the seconds SPUtility.ParseDate(web, “11/29/2009 13:37”, SPDateFormat.DateTime, false) and we are good to go. Full program listing of bug follows:

using System;
using System.Collections.Generic;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;

public class SPUtilityParseDateTest
	public static void RunSnippet()
		using (SPSite site = new SPSite("http://localhost"))
			SPWeb web = site.RootWeb;			
			DateTime parsedDate = SPUtility.ParseDate(web, "11/29/2009 3:37:12 AM", SPDateFormat.DateTime, false);				
			parsedDate = SPUtility.ParseDate(web, "11/29/2009 3:37 AM", SPDateFormat.DateTime, false);				
	#region Helper methods
	public static void Main()
		catch (Exception e)
			string error = string.Format("---\nThe following error occurred while executing the snippet:\n{0}\n---", e.ToString());
			Console.Write("Press any key to continue...");

	private static void WL(object text, params object[] args)
		Console.WriteLine(text.ToString(), args);	
	private static void RL()
	private static void Break() 


The above code assumes you have US regional settings on your root web.

Tagged , , ,