I have problems clearing the password when exporting an application containing a send port using the adapter I made for BizTalk Server 2010.
The send port uses the adapter I made, based on Microsoft.Samples.BizTalk.Adapter.Common BaseAdapter (v.1.0.2).
The TransmitLocation.xsd and TransmitHandler.xsd schemas use a field for a specific AdapterFramework password, and both are defined as:
<xs:element minOccurs="1" default="" name="passwordField"> <xs:simpleType> <xs:annotation> <xs:appinfo> <baf:designer xmlns:baf="BiztalkAdapterFramework.xsd"> <baf:category _locID="mailAuthIndstillingerKategori">Password related category</baf:category> <baf:displayname _locID="passwordName">Password:</baf:displayname> <baf:description _locID="passwordDescription">Password description.</baf:description> <baf:editor assembly="%BTSROOT%\\Developer Tools\\Microsoft.BizTalk.Adapter.Framework.dll">Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordUITypeEditor</baf:editor> <baf:converter assembly="%BTSROOT%\\Developer Tools\\Microsoft.BizTalk.Adapter.Framework.dll">Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordTypeConverter</baf:converter> </baf:designer> </xs:appinfo> </xs:annotation> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:element>
Some google hits mention that setting the vt = "1" 'attribute for an item to be cleared should do the trick. I tried to set / add this attribute when ValidateConfiguration () is called. But the XML-configuration is returned as a string, which is then escaped before being inserted into the < CustomProps> xml exported to the binding file.
I tried to indicate that SendHandlerPropertiesXML and SendLocationPropertiesXML AdapterConfig in the registry entry should use the following <CustomProps> , with the vt = "1" attribute, in the hope that it will remove all the binding properties for the port (not optimal, but better solution than letting anyone or export password):
SendHandlerPropertiesXML : <CustomProps><AdapterConfig vt="1"/></CustomProps> SendLocationPropertiesXML : <CustomProps><AdapterConfig vt="1"/></CustomProps>
When an application with a configured send port is exported, the specific XML is as follows:
<TransportTypeData><CustomProps><AdapterConfig vt="1">&lt;Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;passwordField vt="1"&gt;CLEARTEXTPASSWORD;lt;/passwordField&gt;&lt;uri&gt;SMTP://NOT-USED&lt;/uri&gt;&lt;/Config&gt;</AdapterConfig></CustomProps></TransportTypeData>
Each time the binding is exported, the adapter method is overloaded: ValidateConfiguration () , but there is no way to find out if it was when the adapter was configured or when the bindings were exported, which means: you cannot cancel the password in the returned xml string, since it will also lock password during setup.
There are other built-in adapters that do this (EG: SMTP adapter), and I'm sure this is something basic that I misunderstand. But any help or pointers would be very helpful.