• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 375
  • Last Modified:

VB FTP with windows 2003

Visual Basic 6.0 program was working fine in windows 2000 to ftp the file over a unix box. Putting the same VB program into windows 2003 and getting error as:

Error:     12003
200 Type set to I.
200 PORT command successful.
425 Can't build data connection: Connection timed out.

The file was uploaded with zero byte in it.

Any idea? Maybe some windows 2003 server security causing the problem?
Inet1.URL = frmSetting.txtFTPaddress.Text
 
       Inet1.RequestTimeout = 90
 
       Inet1.UserName = frmSetting.txtFTPuser.Text
       Inet1.Password = frmSetting.txtFTPpassword.Text
 
       Inet1.Execute , "CD " & frmSetting.txtFTPfolder.Text
 
       Me.WaitForResponse
 
      
       strDestinationfile =  strDatetime & "-upload.xml"
         
      Inet1.Execute , "Put " & strExportfile & " " & strDestinationfile
 
      Me.WaitForResponse
 
      Inet1.Execute , "quit"
 
      Me.WaitForResponse

Open in new window

0
Johnny Newbee
Asked:
Johnny Newbee
  • 6
  • 4
1 Solution
 
BlazCommented:
It seems that active mode ftp is not working on your new machine - do you have firewall enabled? Try passive mode or configure firewall to allow active ftp connections.

Can you connect and upload from this server manually - in command prompt via ftp program.
0
 
Johnny NewbeeAuthor Commented:
i checked windows 2003 server, which it seems the firewall is not enabled yet.
how do i set passive mode in vb?
i will try to have a third party ftp program to do the testing then. Thankyou.
0
 
BlazCommented:
I didn't mean a third party program - I meant the microsoft ftp command prompt program which you have available in windows. There you see all the responses and know what went wrong.

Anyhow I believe that your current control is not capable of passive mode FTP:
http://www.experts-exchange.com/Microsoft/Development/Q_22797379.html
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
Johnny NewbeeAuthor Commented:
Under Microsoft command prompt, manually login ftp server and then entry with the command of
"mput testing.xml",

Results:

200 port command successful.
425 Can't build data connection: Connection time out.

It's zero byte on the server too. Connected but not the upload process. Using a third party program IPSwitch the file could manually send to the same ftp server. Any advice? Thank you.

Sorry for the delay due to personal problem.

0
 
BlazCommented:
before trying to write command "mput testing.xml" write command "pasv". This will switch you to passive mode ftp.

Try it and report results here.
0
 
Johnny NewbeeAuthor Commented:
Keep getting "Invalid command" error when I put PASV or pasv
0
 
BlazCommented:
Sorry. My mistake. Windows ftp client does not support this command (passive mode altogether) - I must be using to much linux :-).

Could you check if your working program (IPswitch) has passive or active ftp mode enabled. This will answer our initial question.
0
 
Johnny NewbeeAuthor Commented:
IPswitch was a trial version and I couldn't find the active or passive mode. I also installed the FileZilla and ftp no problem but couldn't see such mode either.
0
 
Johnny NewbeeAuthor Commented:
Any further idea?
Anyone?

Even trying with Java and still the same empty file uploaded.
0
 
Michael PfisterCommented:
I remember remotely having strange problems with the ftp.exe on the command line under Windows 2003 compared to Windows 2000 when talking to a Unix system. The final solution was to copy the ftp.exe from a Windows 2000 system and use that one.
Of course not supported, etc... but it was working.
I don't know if this applies to your problem with VB though.

HTH
0
 
Johnny NewbeeAuthor Commented:
Had a way to easily define passive mode in Java and did the trick. It's not easy to do that in VB.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now