Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Exception error occurs when Dynamic SFTP port runtime uses '-1' instead of '22' as default port in BizTalk Server


View products that this article applies to.

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

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. 

↑ Back to the top


Resolution

This problem is fixed in the following cumulative update for BizTalk Server:

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.

↑ Back to the top


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";

↑ Back to the top


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

↑ Back to the top


Keywords: Dynamic SFTP port uses -1 instead of 22, kb, kbfix, kbqfe, kbHotfixAuto, CI98342

↑ Back to the top

Article Info
Article ID : 4491644
Revision : 11
Created on : 3/2/2019
Published on : 3/2/2019
Exists online : False
Views : 320