Symptoms
Assume that you use Dynamic SFTP port. When you upgrade Microsoft BizTalk Server from 2013 or 2013 R2 to 2016, if the SFTP address that's used at runtime does not specify a port number, the Dynamic SFTP port stops working with the following error:
System.ArgumentException: Port number cannot be negative
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Resolution
This problem is fixed in the following cumulative update for BizTalk Server:
-
Cumulative Update 6 for BizTalk Server 2016
Note The port number '22' is automatically used when there is no port number specified in the SFTP server address that's used at runtime.
Workaround
In BizTalk Server 2013 or 2013 R2, when the port number is not specified, the default SFTP port number '22' is used by default. In BizTalk Server 2016, the value '-1' is used by default. This causes the error and requires the Dynamic send port addresses to include the default port number explicitly. For example:
SFTPDynSendMsg(Microsoft.XLANGs.BaseTypes.Address)= "sftp://127.0.0.1:22//test//" + "%MessageID%.xml";
instead of without port number:
SFTPDynSendMsg(Microsoft.XLANGs.BaseTypes.Address)= "sftp://127.0.0.1//test//" + "%MessageID%.xml";
References
For information about the service packs and cumulative update list for BizTalk Server, see the following article in the Microsoft Knowledge Base:
2555976 Service pack and cumulative update list for BizTalk Server
For more information about BizTalk Server hotfixes, see the following article in the Microsoft Knowledge Base:
2003907 Information about BizTalk hotfixes and Cumulative Update support