Category Archives: SharePoint

WSPBuilder config settings

There are many settings you can tweak with WSPBuilder. Type wspbuilder -help at the command prompt to get a complete list of them. You can set these settings via the command line args, or a config file. To use a … Continue reading

Posted in SharePoint, WSPBuilder | Leave a comment

How did Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll ended up being in the SafeControl list??

In SharePoint, The SafeControl list is defined in the web.config and is a white list of controls that can be placed onto a SharePoint page. The other day I was packaging my solution using WSPBuilder, deploying the WSP, and found … Continue reading

Posted in Enterprise Library, SharePoint, WSPBuilder | Leave a comment

Querying a Hyperlink field using CAML

Recently I had a requirement to search for items with a certain URL in the Hyperlink field. I noticed that the value being stored in the Hyperlink field is of the format ,. The is an absolute URL. Using a … Continue reading

Posted in CAML, SharePoint | Leave a comment

New CAML operator in SharePoint 2010: IN

It took me 20 mins to work out why my CAML was working against 1 environment and not another. It turns out because I was using the IN operator and that’s new in 2010 and not available in 2007. This … Continue reading

Posted in CAML, SharePoint | 2 Comments

CAML Gt AND Lt AND calculated field AND the wicked U2U CAML Query Builder

U2U CAML Query Builder is a must have tool for SharePoint developers, but today it was giving me grief. I have a calculated column called ‘Duration (months)’. I wanted to find items where duration is less than 24 and more … Continue reading

Posted in CAML, SharePoint, SPFieldCalculated | Leave a comment

Constructor on type ‘Microsoft.SharePoint.SPFieldCalculated’ not found – and the weird SharePoint API

Observed in: SharePoint 2007 and SharePoint 2010. Today I was writing some code to add an SPFieldCalculated column to a list. I got the error message Constructor on type ‘Microsoft.SharePoint.SPFieldCalculated’ not found. when calling SPFieldCollection.CreateNewField(fieldType.ToString(), displayName) This call was working … Continue reading

Posted in SharePoint, SPFieldCalculated | Leave a comment

The mysterious SPItemEventProperties.AfterProperties

What you can/cannot access in BeforeProperties and AfterProperties in list event receivers can be mysterious. Here is a very good/clear description of what you can expect when and where: http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25 In addition to what’s in the above link, I found that … Continue reading

Posted in SharePoint | Leave a comment

Can’t create SPSite object in SharePoint 2010: FileNotFoundException: The Web application at http://localhost could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

I wrote my first console app against SP2010 in VS2010 the other day and ran into the above exception at the very first line: using (SPSite site = new SPSite(http://localhost) It turns out because my console app was targeting x86 … Continue reading

Posted in SharePoint | 2 Comments

Upload Multiple Documents in SharePoint stops working with Office 2010 clients

Problem: Uploading Multiple Documents into a Document Library in SharePoint doesn’t work on client machines with Office 2010 installed. You are able to drag & drop or browse for files, but when you click OK, the spinning icon just spins forever … Continue reading

Posted in Office 2010, SharePoint | 1 Comment

Changing custom timer job schedule in SharePoint 2010

Well actually this is really easy to do now in SharePoint 2010. In Central Admin, go to Monitoring > Review job definitions > [job] and you get the setting screen below.   Notice that there is also a RUN NOW … Continue reading

Posted in SharePoint | Leave a comment