WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinInet
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

FTP, Firewalls and Passive Transfer

Keywords: 	 passive transfer

Question:

I'm having trouble making an FTP download using the Windows Internet Extender. I'm trying to go through my Proxy Server, and that's where the problem happens. If I dial up, then it works like a charm. Using these same settings for an http transfer works through the proxy, and I can do this same FTP using IE through the proxy too. So I wonder if I'm doing something wrong here. Here's a sample that will always come up with 0 for the connecthandle variable. My proxy is set for port 21 for FTP. Any hints would be appreciated.
AddExtender("wwint34I.dll")
UseFirewall=1
FTPhost=('ftp.microsoft.com')
file=('dirmap.txt')
WorkDir=('c:\temp')
FTPUser=('anonymous')
FTPPass=('mburt@cbmr.com')

If UseFirewall Then tophandle=iBegin(2,"","") ; use FW settings in registry (IE)
Else tophandle=iBegin(0,"","")
display(2,"tophandle",tophandle)
connecthandle=iHostConnect(tophandle, FTPHost, @FTP, FTPuser, FTPPass)
display(2,"connecthandle",connecthandle)
getfile=iFtpGet(connecthandle,File,"%WorkDir%\%File%",0,1)
display(2,"getfile",getfile)

Answer:

Not sure.

Use:

tophandle=iBegin(2,"","")
under the assumption that MSIE is properly configured to use that proxy server. Otherwise investigate the MSIE proxy settings and see what they say. See if you can get MSIE can do an ftp download.

If your proxy requires passive mode FTP transfers, Specify @FTPPASSIVE for the service in the IHostCOnnect statement. This will use passive mode in all data connections for this FTP session

With a passive transfer, we tell the server we'll initiate communications. We connect and tell them we'll handle all communications.

There currently seems to be a problem using that along with long filenames.


Article ID:   W12594
Filename:   FTP Proxy Server and Passive Transfer.txt
File Created: 2017:07:28:12:58:46
Last Updated: 2001:12:12:11:02:48