If you’re using Windows 7 and have downloaded a NServiceBus sample application from somewhere, it’s likely that you will encounter problems running it. For example you may get the following exception when starting NServiceBus.Host.exe:

Creating the configuration section handler for MsmqTransportConfig: request failed. SecurityException…


System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

This is because by default the Windows 7 restricts the permission for files which are downloaded from the net. Fixing this is fortunately really simple. Just right click every NServiceBus-dll (or .exe) which you have downloaded and click the “Unblock”-button: