Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<cfftp> directory listing problem...

Status
Not open for further replies.

ClarkKent101

Programmer
Jul 19, 2006
48
DE
Hi Everyone,

I'm trying to create a directory listing using <cfftp> to connect and then list the files of a directory. I keep getting this error everytime i execute my code..

"The cause of this exception was that: Accept timed out"

Here is my code..

---------------------------------

<cfftp server="11.111.11.111" connection="myftp" action="open" username="someUserName" password="somePassword" stoponerror="no">
<cfoutput><span class="success">Connection Successful? #cfftp.Succeeded#</span></cfoutput><br /><br />

<cfftp action="listdir" stoponerror="yes" name="listfiles" directory="C:\Files\" connection="myftp">
<cfoutput query="listfiles">#name#</cfoutput><br /><br />

<cfftp action="close" connection="myftp" stoponerror="no">
<cfoutput>Closed Successfully? #cfftp.Succeeded#</cfoutput><br />

---------------------------------

The line it points to when i get the "The cause of this exception was that: Accept timed out." error is the following:

---------------------------------

<cfftp action="listdir" stoponerror="yes" name="listfiles" directory="C:\Files\" connection="myftp">

---------------------------------

I am probably doing something wrong in my code because i've tried serveral different ip addresses that i know are up and running but i still get that error.

Any ideas as to what I'm doing wrong?

Thanks for the help,

- CK
 
Hi Everyone,

After some playing around and a bit of trial and error i managed to figure out what the problem was. I didn't include the passive attribute in my <cfftp> tags. Setting the passive attribute to 'yes' solved the issue.

Hope this helps someone.

Cheers,

- CK
 
Hi Falconseye,

Blaming the firewall was also my first move, but after learning more about the passive attribute I realized I needed to include it.

Thanks for your response :).

Regards,

CK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top