SharePoint Dragons

Nikander & Margriet on SharePoint

Monthly Archives: July 2012

SharePoint Online or not Online: that’s the question

We liked this blog post that discusses pros and cons of Office 365 vs SharePoint on premises:

Send me my password

In the forums, a user asked why SharePoint didn’t send the user name and password via e-mail. For a moment, our immediate was: SharePoint doesn’t send out user names and passwords, now does it? After looking it up it turns out that only SharePoint Foundation 2010 in Active Directory Account Creation Mode does: and

Brownfield Application Development in .NET

Whenever we’re technical reviewers of a book, we feel some responsibility for it. Therefore, we feel it’s a good idea to devote some attention to the BrownField Application Development in .NET book.

The first question that came to our mind was: what is brownfield application development? Well, the author puts it like this:

“An industrial brownfield is a commercial site contaminated by hazardous waste that has the potential to be reused once it’s cleaned up.”

So, this idea applied to software, is called brownfield application development. This book discusses techniques for cleaning up such software messes, namely:

  • Continuous Integration
  • Automated Testing
  • Software metrics and Code Analysis
  • Defect Management
  • Better OO practices
  • Relayering applications
  • Loosening dependencies
  • Cleaning up the UI (discussing MVC and MVP)
  • Refactoring Data Access
  • Managing external system dependencies

Interested? Check out

Update to performance tips page for SharePoint 2010

Uploading a file using the SharePoint client object model

bitUploading a file using the SharePoint client object model is easy, once you have loaded a reference to the SharePoint list you want to upload the file to. One strange thing though, via the Files collection of the List RootFolder, you can directly upload the file to any subfolder you like. It goes like this:

// FileInfo in System.IO namespace
var fileCreationInformation = new FileCreationInformation();

byte[] bytefile = System.IO.File.ReadAllBytes(“c:\\test\Test2.txt”);
fileCreationInformation.Content = bytefile;
fileCreationInformation.Overwrite = true;
fileCreationInformation.Url = “http://astro/MyLibrary/MyFolder/Test2.txt”;

// CurrentList is a client OM List object


The great thing about it is that you can use it to upload files in batches. But, that’s not the end of the story. If you do this, you must realize that the SharePoint client OM will use Base64 Encoding. According to WikiPedia (, the final size of Base64-encoded binary data is equal to 1.37 times the original data size + 814 bytes (for headers). By the way, this is not our experience at all. In our testing, we’ve consistently found the message size to be considerably lower than the equivalent file size on the file system.

Things become more interesting… Check , it describes how to uploading of files larger than 3 MB fails (we did notice that), returning a WebException containing a response property that gives a (400) Bad Request error. This is caused by default internal restrictions on file sizes and timeout settings. Further more, the article says that,unless your files are really huge (like 1 GB) you can catch and ignore it and will notice that the files are uploaded just the same. The last thing doesn’t happen for us, it just fails to upload files larger than 3 MB.

But wait… There seems to be a solution. Article explains how to increase the allowed message batch size using the managed client object model. It does use the server object model to accomplish this though, so be aware of this fact if you’re building a client tool that uploads files using the client OM (and please make sure to target it at x64, otherwise SPWebService.ContentService will return null). See for more info. According to our testing, the SharePoint limit applies to the original file system size, not to the size of the file after Base64 Encoding it. Both articles fail to mention that you need to perform an IISRESET before changes take effect, but after doing so things will be alright.

If you’re interested in seeing this in action, check out the Migration Dragon for SharePoint 2010 at . It uses the SharePoint client object model to upload file and folder structures from the file system to SharePoint 2010 in batches using techniques discussed here.

Direct access to SharePoint Server 2013 Preview

In addition to the previous links, if you go here: you’ll get to the sps 2013 preview.

Can I leave the lights on?

Somebody wanted to know what would happen if:

  1. You add a user to an AD group
  2. You give SharePoint site access to each member of this group
  3. The end user accesses the SharePoint site
  4. You remove a user from a group
  5. The end user doesn’t log off from his desktop and maintains the token he got from AD
  6. The next day, the end user tries to access the SharePoint site again.

As you would expect, the end user won’t be able to access the SharePoint site. In Windows authentication mode, every time an end user is validated a session cookie is set containing an MSCSAuth ticket ( ). No explicit expiration data is set for this cookie, and the cookie will be deleted automatically after the session expires. This happens after a period of inactivity. This time out period is 20 minutes by default and is set in the TimeOut property of the SessionStateSection class ( ).

Microsoft SharePoint 13 and Office 13

SharePoint 2013 and Office 2013 are now officially available as public beta, you can download the products here:

Microsoft announces SharePoint 2013 and Office 2013, watch this:

Check out the Microsoft Office 2013 Preview here: and here

Blog highlight: SharePoint and Yammer

If you want to learn more about Yammer and future SharePoint integration, check out the very nice blog post at

SharePoint 2010 Best Practices

It’s Friday the 13th. Now is as good as any day to update your SharePoint best practices knowledge, because the TN Wiki SharePoint 2010 Best Practices page is updated again. Check out the latest version at