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

Error in sftp adapter calling

Mar 12, 2010 at 10:28 AM

Hi,

I am using Microsoft BizTalk Server 2006 R2 on Windows XP SP2.
I have installed Codeplex SFTP adapter and created send and receive handler for it. when I click on properties, I got below error:

 "Value cannot be null. Parameter name: stream"


My scenario is that, I want to download file from FTP site from my local IIS server. I have created FTP site on my local IIS Server and configure receive location to get file from the site.  Following are the configurations:

FTP site name is "SFTP_VD" having folder "FileIn" that contain text file name "SimpleFile.txt"

Receive Location Properties:

File Mask           :     SimpleFile.txt

SSH host            :     localhost

SSH Port            :     21

SSH Remote Path     :     /sftp_vd/FileIn/        (this is FTP site path for file Input)

SSH User            :     adnan                   (SSO user name)

SSO Affiliate       :     Biz                     (SSO Application Name)

 

When I hit my service I got following error:

 

Method: Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.EndpointTask
Error: Uri:D:/Clients/SFTP_RND_Practice/Services/SFTPPractice/SFTPPractice/FileIn/SimpleFile.txt

------------------------------
Information:
Type: System.Exception
Target:
Message: Uri:D:/Clients/SFTP_RND_Practice/Services/SFTPPractice/SFTPPractice/FileIn/SimpleFile.txt
Stacktrace:


------------------------------
Type: System.Exception
Target: Void connect(Boolean)
Message: Unable to connect to Sftp host [localhost]
Stacktrace:
   at Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.PickupFilesAndSubmit()
   at Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.EndpointTask()


------------------------------
Type: Tamir.SharpSsh.jsch.JSchException
Target: Void connect(Int32)
Message: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:22
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at Tamir.SharpSsh.java.net.Socket..ctor(String host, Int32 port)
   at Tamir.SharpSsh.jsch.Util.createSocket(String host, Int32 port, Int32 timeout)
Stacktrace:
   at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
   at Tamir.SharpSsh.SshBase.ConnectSession(Int32 tcpPort)
   at Tamir.SharpSsh.SshBase.Connect(Int32 tcpPort)
   at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect(Boolean force)

 

Please respond I need help here.

Earliest help will be very appreciated.

Regards,

Adnan Iqbal

Mar 16, 2010 at 8:35 AM

Default properties (receive or send handler config) was never implemented in the adapter. You can only config the adapter on the port level.

Sorry for the inconvenience.

//Mikael

Mar 17, 2010 at 7:35 AM

Hi Mikael,

First of all thanks to reply from you site. Resolution which you mentioned, i could not able to understand. there are some reason behind it:

1) properties which i mentioned previously for "Receive Location":

Receive Location Properties:

File Mask           :     SimpleFile.txt

SSH host            :     localhost

SSH Port            :     22

SSH Remote Path     :     /sftp_vd/FileIn/        (this is FTP site path for file Input)

SSH User            :     adnan                   (SSO user name)

SSO Affiliate       :     Biz                     (SSO Application Name)

 

can u guide me in details that what properties i need to set for receive and send locations in case of SFTP adapter.

I have been facing real problem in this thread for last 1 week. please guide me in details about properties which i have to set(Receive/Response) because it is my first attempt to use CodePlex SFTP adapter.

your prompt response in this regards will be highly appreciable for me.

Regards,

Adnan Iqbal


 

 

 

Mar 18, 2010 at 8:36 AM

I think what you're looking for is an FTPs adapter. not SFTP as that is not supported by IIS.

For more information: http://blogical.se/blogs/johan/archive/2008/02/03/what-kind-of-ftp-did-you-say-you-used.aspx

HTH

//Mikael

Mar 18, 2010 at 12:47 PM

Hi Mikael,

I have to use SFTP adapter which is provided by CodePlex.  As i mentioned earlier that it is my first attempt to use this adapter.  Still i am not able to run my first project though CodePlex SFTP adapter.

i wanted to know from your site that what properties i need to set for Receive/Response locations at BizTalk end for SFTP. 

I developed simple BizTalk service and have two location for "FileIn" and "FileOut".  i need to configure for both Receive/Response Location through CodePlex SFTP adapter. I need that configuration.

 

Now, i think you are able to understand my requirement.

 

looking forward to get quick response from your site.

your prompt response will be highly appreciable for me.

Thanks for Co-operation.

 

Regards,

Adnan Iqbal

Mar 18, 2010 at 3:33 PM

Hi Adnan,

You said:

"I have created FTP site on my local IIS Server and configure receive location to get file from the site.  Following are the configurations: FTP site name is "SFTP_VD" having folder "FileIn" that contain text file name "SimpleFile.txt"

You can't connect to an FTP server using the SFTP adapter. You can only use it with SFTP server, it a very different protocol. If you need to use SFTP you need to install a SFTP/SSH server. If you're on a Windows environment i recommend WinSSHd from bitvise (http://www.bitvise.com/winsshd) or OpenSSH (http://www.openssh.com/).

//Mikael

Mar 19, 2010 at 8:40 AM

Hi Mikael,


I have used WinSCP and FreeSSHD client tools to use SFTP and i have successfully transfer file through it.
Porblem with me is that when i created BizTalk service for testing my scenario by using SFTP adapter so i could not able to transfer file.

I mentioned earlier that please guide me what properties i need to be set on Receive/Response locations at bizTalk end for SFTP.  My purpose is to transfer simple text file from "FileIn" to "FileOut" folder.

I will appreciate if you guide me in details.

Regards,
Adnan Iqbal