Connecting to AS/400 from ASP.NET, following are the options available:
1. rfrompcb.exe
Fails with no error message but the following output:
IBM iSeries Access for WindowsVersion 5 Release 2 Level 0Transfer data to iSeries(C) Copyright IBM Corporation and Others 1984, 2002. All rights reserved.U.S. Government Users Restricted Rights - Use, duplication or disclosurerestricted by GSA ADP Schedule Contract with IBM Corp.Licensed Materials - Property of IBM
2. Program Files/IBM/Client Access/Shared/cwbx.dll - IBM AS/400 Client Acess Express ActiveX Object Library
Fails with [COMException] 'Unspecified Error' exception
Conclusion
The conclusion after a detailed study was the connectivity failed from ASP.NET but worked with from commandline or desktop application.
Problem
The problem is the identity under which aspnet worker process works is as configured in machine.config meaning 'machine' or SYSTEM or any NT user as specified and this user doesn't have rights to access AS/400 through the firewall.
Solution
The solution to this problem is to set the username and password values of