Uploading a file into a library via CSOM, even if the library does not exist

A customer of mine asked me how to upload a file, using CSOM from .NET, into a target library/folder regardless the target folder already exists or not. Here you can see a code sample, which leverages the ExceptionHandlingScope available in CSOM. static void FileUploadWithExceptionHandlingScope() { ClientContext ctx = new ClientContext(“http://demo-sp2013.sharepoint.local/sites/DemoSite/“); ExceptionHandlingScope scope = new ExceptionHandlingScope(ctx); […]

Read more

Errata corrige for sample code 5.6 of my book

I’ve just found (thanks to a brilliant reader!) that code sample 5.6 of my book is wrong. Here you can see the right version of the code excerpt: // Listing 5-6 static void BrowseForContactsWithLINQ() { // Open the current ClientContext ClientContext ctx = new ClientContext(“http://devbook.sp2010.local/“); // Prepare a reference to the current Site Collection Site […]

Read more

Field: DisplayName, StaticName and Name

When you define a custom field through the Field feature element, you have the capability to define three different attributes that declare the Name, DisplayName and StaticName of the field. You might be wondering why there are three attributes to define three kinds of names for a single field. The XML schema that defines a […]

Read more

Custom Service Application for SharePoint 2010

This week, while attending the Microsoft SharePoint Conference 2011 in Anaheim, I saw the session of Todd Bleeker, who is always brilliant and involving. Todd showed how to startup developing a custom Service Application based on a WCF service. In case you are interested in going deeper on this topic, I’d like to remind you […]

Read more

SharePoint Conference 2011– Anaheim, CA

Here are some news directly from the keynote of SharePoint Conference 2011, in Anaheim, CA. The most interesting news, from a developer viewpoint, is the upcoming release (by the end of this year) of an update of SharePoint Online for Office365. This update will deliver the capability to host BCS against Web Services in SharePoint […]

Read more

I will speak at the European SharePoint Conference in October 2011

I’m happy to announce that I will speak at the upcoming European SharePoint Conference 2011, which will be take place in Berlin (Germany) from the 18th of October to the 20th of October 2011. I will talk about the following three topics: W28 – Developing a SharePoint 2010 Service Application [Wednesday 19th Oct]: this will […]

Read more

How to provision a Sandboxed Web Part through a custom module feature

As you probably know, you can use a module feature to provision a file to a SharePoint site. Through this feature you can provision images, Web Parts, master pages, pages, or whatever you like. In case you provision Web Part Pages, you can also provide some information and configuration elements, within the module element, in […]

Read more