This project has moved and is read-only. For the latest updates, please go here.

Connecting to a single sFTP site with different users in Send port sends data to wrong user

Apr 5, 2013 at 3:16 PM
It's a strange issue i have with the sFTP adapter. I have a requirement to send data to a single sFTP site, but, i will have to use different user ids depends on which business sends data. I have 2 different send ports set up with unique user ids but same sFTP information.

When files are dropped to BizTalk it sends data to wrong folder. It does not happen consistently but it happens more often. But, BizTalk log shows that it has used the correct send port. But, data still goes to wrong place. When i looked at the URI in BizTalk send port, it is the same for both send ports.

has anyone faced this issue? Any suggestions/resolution?
May 20, 2013 at 9:09 PM
Yes we have the same issue. How have you gotten around it. We have two BizTalk servers and avoided the issue by having the two send ports run on the different BizTalk servers. Timing may also help since we do not have the issue when the sends run 30 minutes apart, we only seem to have issue when sending at about the same time. I did not try this but what if you used different server names that you force to resolve to the same IP in the windows hosts file.
Oct 4, 2013 at 3:43 PM
Has you found any solution to this issue? I have got complaints from a customer that I recommended to use this adapter. The error description I got from them is exactly the same as the issue that you describes.
Oct 4, 2013 at 3:59 PM
gelfman, We are in the process of going from BizTalk 2006 to 2013 and the Microsoft provided SFTP adapter does not seem to have this issue. The Microsoft adapter does lack some features such as logging but again does not seem to have this particular issue. Did you try tricking it with the hosts file approach, I did not try this it was just a theroy ?
Oct 10, 2014 at 1:43 AM
The issue appears to be the connection pool cache being keyed on only the hostname. If you use the same hostname with different credentials it will cache the first credential set used and any subsequent connection to that host will acquire those credentials even if you supply different creds.

A workaround would be to use a different hostname for the send port as bnorma01 suggested. This could be using the NETBIOS name, DNS alias, FQDN, Host file name or IP address for each unique hostname+credential combo you have. The host file is probably a good option if there are many combos required.

The correct fix is to change the codebase to key the connection pool cache on hostname+credential.