BizTalk Server: Save password in binding file for WCF Adapter

Recently I found myself in need of adding a username and password to a BizTalk Server application binding file. By default, WCF bindings at least, do not save any password currently assigned to a WCF-Custom send port when you export the application bindings from within Management Console. 

To do that, export binding file after application is fully configured. Open it and locate section(s) with configuration for the ports/locations of interest. For example for the WCF receive location it will be in:
Find emtpy password tag in this section that will look like:
&lt;Password vt="1"/&gt;
In Notepad++:

In Browser:

Change it to enclose you password value and vt attribute value to "8":
&lt;Password vt="8"&gt;MyPassword&lt;/Password&gt;
The same can be done to a username, replacing the "Password" tag with "UserName".  This method can also be used in conjunction with BizTalk Deployment Framework (BTDF) variables specified at design-time in the SettingsFileGenerator.xml, or on deployment when specified as an _ENV_VARIABLE in the InstallWizard.xml file.

Save and use this binding for an automated deployment script.

1 comment: