While going through my adventure on a BizTalk Server + Host Integration Server (HIS) project and mainframe connectivity, I’m trying to migrate an old HIS2006 solution to BTS2016 + HIS2016. Just ten years of evolution, I notice that:
- Many things on HIS2006 are not compatible with HIS2016.
- You may found some new limitations and new features.
- Luckily Microsoft provides tools to migrate several components, especially the TI resources.
- HIS Tools have changed:
- SNA Manager is quite the same. Maybe some screens and options are a bit different.
- TI Manager is no longer available. Now we have a different tool called TI Configuration Tool with the same goals as the previous one. However, the way we configure Host-Initiated Processing (HIP) and Windows-Initiated Processing (WIP) is different nowadays.
- The HIS documentation is quite limited, and you will not find much information about it.
I have to say I’m lucky to have good friends, and because of that, I have been learning a lot with my dear friend Steve Melan, that is the best expert I know regarding HIS.
The last strange (all of them are strange) issue I encountered while trying to Add Host-Initiated Processing (HIP) Object on my HIP configuration by using the Transaction Integration (TI) Configuration Tool was:
Add TI HIP Implementing Assembly
Invalid Assembly. Assembly does not contain any TI Objects that inherit from interface: namespace.interface
Or in other cases:
Invalid Assembly. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Cause
As I told you before, many things changed from HIS2006 to HIS2016, and migrate the Host Application projects is not direct – Visual Studio does not migrate the project as it does for a C# project or BizTalk Server project. Instead, you need to migrate the resources using the TIConversionTool and then import them to your Visual Studio Host Application project.
And you need to make sure that you are not breaking anything like methods and interface names. And then, you need to reference these new resources (DLL containing the .Net Server Definition) on your interface implementation project. This interface implementation is a C#, or VB, class library project. Then, inside that project, you need to create a class that implements the inherited .Net Server Definition interface and provides the implementation of all the members defined within the interface – in this case, all the operations or COBOL programs in that Host Application .Net Server Definition.
My problem was that this interface implementation was also a very old project, compiled in .NET 2.0. For some reason, I yet not completely understood, and despite successfully migrating them to .NET4.6.1, I couldn’t make it fully compatible with the HIP, and I always got these two issues above.
Solution
The resolution was, in fact, quite simple. Basically, I create a new C# class library project from scratch and copy-paste all the existing code to the new one, recreating the old one manually.
Surprise… everything work perfectly! And then, I could create the HIP object.
An example of a Host Application .Net Server Definition interface implementation is something like this:
using RemoteOrder; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; using System.Text; using System.Threading.Tasks; using IHIPServices; namespace TestOrders { public class OrderImplementation : IHIPServices { void IHIPServices.GetOrders(ref string value) { /* * Implement the logic * */ } } }
What you need to be aware of are:
- It should reference these two HIS assemblies:
- Microsoft.HostIntegration.TI.ClientContext
- Microsoft.HostIntegration.TI.ServerContext
- It should reference the Host Application .Net Server Definition assembly
- In this case, represented by IHIPServices
- Implement the interface members
- In this case, represented by IHIPServices.GetOrders(ref string value)