Article ID: 884378 - View products that this article applies to.
In the Microsoft Host Integration Server 2004 Transaction Integrator (TI), if you use the Context Array parameter incorrectly in a TI method call, you receive ambiguous error messages that are similar to the following:
An unhandled exception of type "System.InvalidCastException" occurred in Microsoft.visualbasic.dll
An unhandled exception of type "System.MissingMemberException" occurred in Microsoft visualbasic.dll
This behavior occurs because the Context Array parameter is not used correctly in code. The error messages do not identify the specific source of the coding problem.
You receive one of these error messages when you use the Context Array parameter by using one of the following methods:
Host Integration Server 2004 TI enables a Microsoft Windows program to access mainframe or AS/400 programs. You can use ClientContext to pass user name and password data directly in the datastream to the host by supplying the data in a Context Array parameter. The online Help files document this feature. If the Context Array parameter is missing, you will receive a "No such method" message from the .NET runtime. This behavior occurs because the number of parameters in the code does not match the number of parameters in the assembly. Therefore, a matching method call is not found. Alternatively, if the .NET runtime finds a method with the correct name with the correct number of parameters, but the .NET runtime cannot match the type of one of the parameters to the Assembly definitions, you receive a parameter mismatch error message.
To avoid coding the Context Array parameter incorrectly, you may want to reference the TI object in the project and use early binding. This will enable using Microsoft IntelliSense to display the expected parameters and data types. Incorrect coding will cause compilation errors instead of runtime errors. If you want to use late binding, you may modify the code to use late binding after the ClientContext code is written and tested.
For more information, see the Host Integration Server 2004 online Help.
Contact us for more help
Connect with Answer Desk for expert help.