Sorry for the delay of this answer. I found out that it has nothing to do with the .NET Framework or my Code.
I tried it in a regular C# Form and my Code works fine. I tried it in a C# Library called from Microsoft BizTalk Server 2004 and it did error. It had to do with permissions. Thanks for your help,

Stephan