Apparently it would be the 3.5 framework that misbehaved during install and changed the config file innapropriately.
There seem to be others with the same issue, a bug is open at Microsoft but they can't reproduce: Microsoft Connect.
Some other threads about the same issue
http://stackoverflow.com/questions/1292 … sexception
http://community.sharpdevelop.net/forum … 24166.aspx
Apparently the work around is to repair the config file with ServiceModelReg.exe (didn't quite get what was the suggested technique…) or to remove the serviceModel block in the machine.config file, or replace it with a working one. (backup first!)
There doesn't seem to be any way for a program to detect this and repair automatically.
If I understood correctly, this issue prevents any .NET 2.0 application to work.
I'm not even sure that removing the .NET framework and reinstall it would make the problem go away.![]()

