Jun 24, 2012 05:23 AM|Barbajuan|LINK
If you replace as400 by system like this :
foreach (cwbx.Error error in system.Errors)
You will get more information.
It could also be interresting to know what is the exception you recieve.
Also check that you can ping your AS400 at this IP address 126.96.36.199