Expression trees, delegates, functors how and why to use them

As of two weeks ago I’ve had the privilege to start doing some development work in a project where a lot of expression trees are used and most classes have at least one implementation of a Func delegate. There’s nothing wrong with that, as it’s something which dates from the .NET 3.0 era if I’m not mistaken, so every .NET 3.5 certified/professional developer should know the existence of them. Downside is, if your only real experience with the matter is reading them up in a text book, there’s a big chance you have forgotten on how and why to use it. Read more →

SharePoint and the Local Activation permission on DCOM objects on 2008R2

Another SharePoint farm installation, another problem. I had to install SharePoint 2007 (don’t ask..) on a Windows Server 2008R2 development machine. This is quite doable, as long as you install Service pack 2 of SharePoint. I figured it would be no problem and just another install, like I’ve done a gazillion times before. Everything went quite well and because of the SSD disk, the installation didn’t take as long as I was used to. Read more →

Saving files from the web

A few weeks ago I had to create an application which would download files from several SharePoint libraries. I had just done a similar thing for a Windows Phone 7 application, so I could reuse most of the code. After running the application I received an awkward exception message which said: “This stream does not support seek operations”. This exception was triggered by the following code snippet:https:// HttpWebRequest request = (HttpWebRequest)WebRequest. Read more →

New desktop setup

It’s been about 8 or 9 years since I’ve bought a new desktop system for myself. You can imagine the desktop I had was pretty antique and didn’t run the newest software quite well. Running Windows 7 on the Pentium 4 @ 3.2GHz and a ATI Radeon 9800XT was a pain. Even running Windows XP SP3 was a starting to be a bit too much for the system. Most of the time I’m buying a system I don’t need to upgrade too much in the future, perhaps some extra memory, but that’s about it. Read more →

Decrypting encrypted data in config file

This is something which has been available in the .NET Framework since, well, forever. I’m talking about encrypting data in the config file of your (web)application. Every time I studied for the Microsoft developer exams I was reminded on this feature and thought “Hey, I really should use this in the next project”. Up until now I’ve never used this feature though. The project I’m currently working on has some setup which encrypts the the config file when it’s deployed. Read more →