In a BizTalk environment it is sometimes necessary to create a custom adapter to implement functionality that is not available with the out-of-the-box adapters. This article will handle a small part in the process of implementing your custom adapter, the deployment part.
Also, this article only applies to adapters that use strong named assemblies. Using strong named assemblies has advantages like unique names, versioning, security,… See this link: http://msdn.microsoft.com/en-us/library/wd40t7ad(VS.71).aspx
To install or update your custom adapter you need to do the following steps.
Install the assemblies in the GAC.
You can use a MSI installation for production. For development you can drag your newly built assemblies in the GAC where the BizTalk runtime resides.You do this for both the design-time and run-time assembly.
When the BizTalk administration console starts it will check the registry for the design-time settings (assemblypath,propertynamespace). Therefor it is important to restart your administration console each time you update these. You can generate a registry file (.reg) to insert/update the adapter registry settings using the adapter registration wizard (see this link: http://msdn.microsoft.com/en-us/library/aa578379(BTS.20).aspx). Unfortunately some generated items are incorrect when using strong named assemblies. You can’t choose strong named assemblies when choosing the assemblies that represent your adapter with the Registration Wizard. This leads to values like these in the registry file: “AdapterMgmtAssemblyPath”=”C:\\MyProject\\bin\\debug\\AdapterManagement.dll”This is not the path for a strong named assembly. You can delete the values for the AdapterMgmtAssemblyPath, OutboundAssemblyPath and InboundAssemblyPath. Execute the registry file. You can verify the settings with the registry editor.
Update Database table
If you have not yet added your adapter to the available adapters yet, do this now. This is done by right clicking the adapters node in the administration console and choose new, adapter. Add your custom adapter. When adding your custom adapter, a record will be created in the adm_adapter table in the BizTalkMgmtDb. This record will be read when the runtime (host) starts, the host will load your adapter assembly based on the references in this table. It is not customary to change data in the BizTalk databases manually but we’ll make an exception just this once. Open the adm_adapter table in the BizTalkMgmtDb. Verify if strong named references to your runtime assembly is used. For example the inboundTypeName column should contain MyCompany.BizTalk.FileReceiver, MyCompany.BizTalk.FileReceiverClass, Version=126.96.36.199, Culture=neutral, publicKeyToken=63168444d906e8f6
Activate your adapter
You activate the new version of your adapter by restarting all the host instances that use it. Watch out for changed properties. These should be filled in properly for each receive location or send port that uses your adapter.