Category Archives: Software

Using AngularJS with a WordPress backend

Thanks to the WordPress JSON API plugin it’s really easy to make a WordPress theme using AngularJS, or use WordPress as a backend for your AngularJS application. In this post I’ll describe how to create a basic theme from scratch and fetch posts using AngularJS and the JSON API plugin. In order to follow this tutorial it’s useful to have some basic knowlegde about WordPress theme development and AngularJS.

Continue reading Using AngularJS with a WordPress backend

Relationships in Entity Framework Code First

In this article I will describe a common mapping problem with relationships in Entity Framework Code First. I once had this problem as well and got the answer from StackOverflow (if interested, see my question here).

Consider the following models:

And the following (psuedo)code to save a ClassA:

Continue reading Relationships in Entity Framework Code First

MSBuild task to compile LESS files

When you are using LESS to create dynamic style sheets the performance of your website will increase when you compile those files to CSS before uploading the webapplication to a server. In this post I’ll describe how to create a build task for MSBuild that will compile all LESS files in a directory. I use this task in my deployment environment for web applications. It is part of a series of tasks that build the application, copies all the files to a deployment directory and does some post processing (compressing JavaScript, images, etc.). Of course it is possible to compile LESS files dynamically using a HttpHandler as well, for more information visit

Continue reading MSBuild task to compile LESS files

Fix hMailServer 550 Invalid HELO string error

On a web server I’m running hMailServer to handle all e-mail traffic, especially SMTP. Today I noticed in some cases the e-mail hMailServer sent was rejected by the receiving party. It turned out the receiving party was a Microsoft Exchange environment. The hMailServer SMTP log stated the following:

On the internet I found this topic. The solution to this problem is as follows: in the hMailServer administrator go to Settings > Protocols > SMTP > E-Mail Delivery tab. Enter the host name of your web server (e.g. a domain name) in the “local host name” field, and save the changes. Now the Exchange server will accept your e-mail.


How to set up a PPTP VPN server on Ubuntu

Nowadays free public WiFi networks are available in many areas, for example in airports, restaurants or public transportation. A major disadvantage of a public WiFi network is security. You can’t be sure no one stealing sensitive data by eavesdropping the connections. A solution is to setup a secure/encrypted channel to a Virtual Private Network (VPN). When using a VPN and you connect to for instance your webmail, the data is sent via the VPN. In this post I’ll describe how to set up a PPTP VPN server on Ubuntu. Using PPTP you can not only connect your laptop, but also your Android or iOS (iPhone or iPad) devices.

Continue reading How to set up a PPTP VPN server on Ubuntu

Simple logger for NHibernate 3

A logger is a very useful tool when developing a (web)application, especially when you’re using an object-relation mapping solution such as NHibernate or Entity Framework. In order to improve the performance of your application it is useful to analyze the SQL queries and other information (e.g. warnings, errors, caching) about the object-relation mapping.

Since NHibernate 3 it is possible to implement a custom logger. Log4net is not necessary anymore. In this post I’ll describe how to implement your own logger.

Continue reading Simple logger for NHibernate 3

How to send an e-mail from your Android app

I’m developing an Android application where the user must be able to send a file stored on the SD Card to a specific e-mail address. By using Android’s Intent class this is very easy. The following code snippet will bring up an e-mail application choose dialog.

Fix .NET 4 SocketPermission for MySQL driver in Medium Trust

Most .NET 4 shared hosting providers offering their customers a medium trust environment. This is not a problem for most web applications unless the applications uses MySQL in combination with the .NET MySQL driver (MySQL.Data.dll). The MySQL driver connects to the MySQL database using a socket. However, sockets are not allowed in medium trust. The application will throw a SecurityException with the following message:

Continue reading Fix .NET 4 SocketPermission for MySQL driver in Medium Trust

Building a Home Theater PC part 2

Today I finally assembled my HTPC. There were some stock issues with the case I ordered, so after a week I ordered another. Although the motherboard is passively cooled I decided to enable one of the two case fans. Unfortunately the fans are very noisy when directly connected to the motherboard, so I placed a simple Zalman fancontroller between the fan and motherboard.

After building the HTPC I first installed Ubuntu 10.10 using a USB stick. Then I used this guide to install XBMC.

Continue reading Building a Home Theater PC part 2