January 20, 2008
By August of 2009 every citizen in Belgium that is at least 12 years old is required to carry an eletronic identity card. This step-by-step article discusses the steps you need to take in order to read data from such a card from .NET.
I programmed this somewhere in the winter of 2006 in
Borland CodeGear Delphi. Since then I’ve switched my environment to .NET and this seemed like an interesting bit of code to migrate.
The language of choice in this article is VB.NET, but it is easily translatable to C#. And there are more than enough examples of how to access the Belgian identity card using C# out there on the net.
Due to the article’s length I have choosen to divide it into three parts. In the first part, I’ll be describing the general things you have to do in order to retrieve the data from the card. In the second part you’ll see how you can monitor the status of a smartcard reader so that you can detect when a card is inserted or ejected from the reader and in the third and final part we will combine the code from the previous parts to create a simple and reusable class.
Let’s get started, then…