| | | Forum Newbie
       
Group: Forum Members Last Login: 12/13/2004 11:44:00 AM Posts: 1, Visits: 1 |
| i'm getting the following error when i call CreateConnection on my WsftpApi object: System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. at WsftpSDK.WsftpApiClass.CreateConnection(String Host, String userId, String password, Int32 nType, Int32 port) here's what i do: i create a connection, download some files, and disconnect. the second time around, i get the above error. i am using the same WsftpApi instance to create both connections, and both connections are to the same address and port with the same username and password. the first attempt works, the second attempt does not. please help! |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 12/30/2004 3:17:00 PM Posts: 7, Visits: 1 |
| Scott,
In Visual Basic6, We do this in our FTP "Loop": (Code Fragment) --- ' Create FTP Connection - ONCE in this loop! Set pConn = papi.CreateConnection(ftpSite, ftpUser, ftpPassword, WsftpConnectionTypes.WSFTP_CT_FTP, 21) . . . *** Transfer Some Files *** . . .
' If we connected to a session then disconnect it! If Not (pConn Is Nothing) Then ' *** Disconnect from FTP Session *** pConn.Disconnect ' ' Clear Connection Data Set pConn = Nothing ' ' *** End of FTP Transfer Files Loop *** ' End If ---
Then call the same logic to transfer more files later. Key to this is the "pConn.Disconnect" and "set pConn = Nothing".
We are then able to call the loop again without a connection issue.
Hope that helps you fix the problem.
 |
| |
|
|