Neues Jahr, neue Blog Engine - Roadmap für 2012

Ich möchte dieses Jahr wieder mehr zu meinen Projekten schreiben. Ich habe da einige gute Ideen.

Das erste Projekt auf der Liste: Mein etwas angestaubtes Blog, basierend auf dasBlog durch eine neuere Engine ersetzen. Das habe ich nun gemacht und wenn du das hier liest, funktioniert BlogEngine.NET wohl. Das letzte dasBlog Release ist von 2009, wobei auf Codeplex weiter fleißig auch am Source gearbeitet wird. Dennoch habe ich mich entschieden zu wechseln. Das einzige was ich bisher vermisse ist die OpenId Integration. BlogEngine.NET hat da leider noch nichts. Zumindest konnte ich nichts finden.

Außerdem habe ich bei der Gelegenheit das Application Request Routing (ARR) Modul für den IIS installiert, damit die meisten alten Blog Links auch weiterhin funktionieren. Dazu habe ich einfach ein paar Redirect Rules erstellt. Somit funktionieren die alten Artikel Links auch weiterhin.

Eine weitere Neuigkeit ist: Proxy Switcher hat nun auch eine eigene URL ( Das Ziel ist dort auch bald nicht nur einen Redirect zu haben, sondern eine eigene Seite.

NuGet Package Manager or How to make “source code sharing” across projects much better


In a company with more than one development project sometime it happens that someone says: Hey, we need a common logging component shared across all projects.
Now the solution could be to develop such a logging component and share the assembly with all projects. However, if there is some code that should/must be unique to each project it is a bit more complicated. If you want to do that with SharePoint 2010 and build a logging component on top of the ULS log and want each project to be configurable in the Central Administration you need to know all future projects and categories or you need some unique code.

Note: The logging component is only a very easy example and might not be the best one.


Microsoft created NuGet. A package manager for Visual Studio. Quote of the official site:

NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.

You can add it easily to Visual Studio 2010 by Tools->Extension Manager. Search for “NuGet”. After it is installed, you can add packages to a project by right clicking on a project in the Solution Explorer and click “Add Library Package Reference…”


Now as a company you don’t want your super-fancy code to show up for everyone as open-source. Therefore, NuGet can have more than one package source. You can even use a file share. Open Tools->Library Package Manager->Package Manager Settings:

image image

Bring it together

To get rid of “each project copy the source from the source of the other project from the source of the source of the source from another project” you can now use NuGet.

The idea is:
- Create the Logger.cs file
- Add TODOs to the code where the developer need to change something
- Make a NuGet package from it
- Let the project teams use the NuGet package (and distribute updates to the source automatically as well!)

Advantage: There is only one source! And if the owner of the NuGet package updates it, all project teams will be automatically notified about an update!

Create the NuGet package

In my example I talk about the comon logger component. A single Logger.cs file. However, NuGet can handle even more complex packages with PowerShell code, etc.

So download the NuGet command-line tool and create a new folder where all the stuff for the package will go to.

Open a command prompt and enter:

nuget spec

This will automatically create an empty package specification file called Package.nuspec. Open this file in notepad and modify the required values. Also rename the file to match the id property.


Now create a folder called “content”. Everything in this folder will be merged into the solution on installation of the package. So I put the file Logger.cs in this folder.
However, I don’t want that all users are required to use the same namespace, so you can change the file extension to “.cs.pp” to let NuGet “pre-process” the file.

Within the file you can then set some tokens to be replaced on installation. You can find a list of available properties here on MSDN.

The folder structure looks like this:


And the Logger.cs.pp in the content folder:


As you can see, I used the token $rootnamespace$. That one will be replaced by the root namespace of the target project.

Ok, lets make a package:

nuget pack

The output is a file called SPLogger.1.0.nupkg. You can publish it to the official NuGet package server or use it only internally by copying it to a file share.
Now open Visual Studio add the file share as a package source and search for it in the “Add Library Package Reference” window or open the NuGet console in Visual Studio (View->Other Windows->Package Manager Console) and type:

Install-Package SPLogger


That’s it. If you change the version number in your .nuspec file, create a new package and copy it also to your file share, the project team can decide to update to the latest version in the “Library Package Reference” dialog. You can even uninstall the package and everything will be removed from the project without leaving anything behind.

A great tool if you have more than one computer on your desk

A few years ago, I found a tool to share the keyboard and mouse of one computer with another computer. That looks like this:


As you can see, the tool also runs on any platform not only Windows.

Today I have two laptops on my desk and thought about that great tool. Now I found it again. It is called “Synergy” and can be downloaded for free here. The author updated it and it works very well.


The configuration is farely easy:
On the computer with the keyboard and mouse, start the tool, click “Configure Server” and you will get this dialog:


There you can drag computers around your existing one where they physical are placed.
Now save and click start.

On the other computers select “Client” and enter the hostname or IP address of the host computer. Done.

My first Windows Phone 7 application: MySite for WP7 - Part 1

A few weeks ago, my employer, Avanade Germany, announced an internal “Windows Phone 7 Contest”. The goal is to create a (business) app for Microsofts new Windows Phone 7 (WP7) system. I just had some ideas and decided to go with “MySite for WP7”. At least because I’m working in the “Portals & Collaboration” Service Line and I really like the new SharePoint 2010 MySite. That, and because the price for the best three apps is an Xbox 360 with Kinect. Winking smile


If you have no idea, what the SharePoint 2010 MySite is, here is a short introduction: Think about a “little” Facebook (social network) within your company. You can write status messages, see a newsfeed about your colleagues, post comments on the note boards of your colleagues, upload pictures, etc.

I know, that WP7 comes with SharePoint integration, but without a cool client for the MySite. I will try to build one (and hopefully win the Xbox).

Start with WP7

I will not give you an overview what you need to start, because there are a lot of resources to learn WP7 development. I already know .NET, C#, SharePoint and Silverlight and that’s everything you need to start. Download the Development Toolkit (for free) and start up Visual Studio.

First of all I decided to go with the Panorama Template, because it is easy to use and looks really nice. Also it supports my idea of different MySite tasks. The design-time support is great as well. If you click on the panorama page in the XAML code, the designer shows the corresponding page.


But before I go into much UI details, we should thought about the backend.

How to connect to SharePoint?

SharepPoint 2010 provides a web services API (WCF and legacy ASMX) to access most of the SharePoint functionality. Therefore I tried to access these services directly from the phone, but that did not work, because of two main points:

So obviously a workaround is required. Here is my idea of a “proxy service”:


That means, the WP7 app connects to an SSL secured WCF (silverlight-enabled) proxy service (without authentication) in the cloud. The service then connects to the SharePoint service with the provided credentials. For privacy reasons, a company that do not want to transmit sensitive data over the cloud service can host their own proxy service within their secure environment to make it accessible by their employees.

The proxy service can for example get the current status message from your MySite:

public string GetStatus(AccountCredentials credentials)
  var client = GetProfileServiceClient(credentials);

  string fqnUsername = credentials.Domain + "\\" + credentials.Username;
  var data = client.GetUserProfileByName(fqnUsername);

  var statusProp = (from d in data
                    where d.Name == "SPS-StatusNotes"
                    select d).FirstOrDefault();

  return statusProp.Values[0].Value.ToString();

I defined a class AccountCredentials which contains username, domain, password and SharePoint MySite URL. This data is entered in the WP7 app by the user. Now the proxy service is called with this data and calls the SharePoint profile service (with the URL provided) to get the current status message.

This approach is not only for communicating with SharePoint, but can also be used with other services which cannot directly be called from the phone.

Alternative to a Proxy Service: UAG

Another fairly new (at least for me) way is the Forefront Unified Access Gateway (UAG). See also this video from TechED. In the video you can see, that Microsoft requires a company to have a UAG in place to use the build-in SharePoint features of WP7. So it seems, that also Microsoft cannot use NTLM on WP7.

WP7 with UAG uses HTTPS for all communications and what is know as basic authentication. One problem why I’m currently not supporting UAG in my App is, because there are no developer resources how to integrate it in your own application. The only info you got from the video is to use signUrl.asp to get the token after authentication. If anyone has more info, please add a comment.

Learn more in part 2 of the series in a few days where I will talk about the User Interface.

Proxy Switcher meets Facebook, Twitter and SharePoint 2010 MySite

I was on vacation the last two weeks so I had some time for some funny things. For Proxy Switcher I thought it would be a nice idea to have an AddIn to set the status message of social networks on a network change. The two major players are Facebook and Twitter. Personally I’m not using Twitter, but that’s another story. Additionally, at Avanade we have our MySites on SharePoint 2010 with the new feature enabled to add status messages there as well. (See also our Avanade SharePoint Blog)


Your TODO now: Download Proxy Switcher (if its not already installed), then go to the More AddIns page to download the “Social Media Update Action AddIn”.

Proxy Switcher – Version 3.1

Es ist soweit und Proxy Switcher steht in einer komplett überarbeiteten Version bereit. Inzwischen ist auch die Version 3.0 übersprungen und die neue Version enthält eine Menge neuer Funktionen. Mehr dazu auf der Projekt Seite und im Changelog.

Nur die Group Policy Funktionen sind leider immer noch nur eingeschränkt verfügbar, stehen aber für die nächste Version ganz oben auf der Liste.

Wünsche und Fehler können wie gehabt im Forum angesprochen werden oder direkt im Bug Tracker eingetragen werden.

Proxy Switcher 3 – BETA

Ab sofort gibt es den Proxy Switcher v3 als öffentliche Beta zum download.


Wichtig: .NET Framework 4 wird benötigt.
Desweiteren liefen die Tests bisher nur auf Windows 7.

Alle auftretenden Probleme und Vorschläge bitte hier eintragen:


Ein paar Highlights:

Komplettes Re-Design (Sichtbar und im Hintergrund)
MEF als AddIn Framework
Ribbon User Interface (
Windows 7 Location API Integration

Windows 7 Location API – A new feature for Proxy Switcher


Currently, I’m investigating what can be improved in the new release of Proxy Switcher.

For those of you, who don’t know what Proxy Switcher is a few facts:

  • Proxy Switcher automatically set the proxy depending on your current network connection
  • Beside of that, it can set other things too. E.g.: Execute scripts, change default printer, etc.
  • Click here to go to the project site for more info

Windows 7 Sensor and Location Platform

With Windows 7 Microsoft created a new “Sensor and Location Platform”. Until now, there is not much hardware compatible with it, but this hopefully will change in the near future.
With this API, applications can easily access the available sensors. Here you can find some examples and also a “manual” location provider by clicking on a map.

For the location API, there is a cool free “software” device called Geosense. From their website:

Geosense is designed to use a hybrid mix of geolocation service providers and geolocation methods to pinpoint the most accurate location information possible - including but not limited to WiFi triangulation, cell tower triangulation and IP lookup. Source:

While your laptop vendor has not yet integrated a Windows 7 compatible hardware GPS sensor, Geosense is a good compromise.

Proxy Switcher Integration

For Proxy Switcher this will become a new option for switching proxy configurations, or doing some other stuff as you can see here:

image  (click to open in a new window)



To access the Windows 7 location API all you need is the .NET Framework 4. There is a new System.Device.dll (contained in the Client Profile of the .NET Framework). Adding a reference allows you to access the current location.

First, add the following using statement:

using System.Device.Location;

Use the following code  to get the address:

GeoCoordinateWatcher watcher = new GeoCoordinateWatcher();
watcher.TryStart(false, TimeSpan.FromMilliseconds(1000));
// Get the location, including lat, long, speed, altitude, etc.
GeoCoordinate location = watcher.Position.Location;
// Try to get the current address, including street, city, etc.
CivicAddressResolver resolver = new CivicAddressResolver();
CivicAddress address = resolver.ResolveAddress(location);


With this new functionality, Proxy Switcher is not a pure “Proxy Switcher” anymore, but a multi-functional network/location based “generic” extensible execution tool. New actions can be easily created by developers through the MEF AddIn Framework. More on this in a later post.


If you want to become a beta tester, feel free to contact me at “mail” at thisdomain.