Advertisement

06.12.2007 at 06:54AM PDT, ID: 22628292
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Downloading a file with FTP in ASP code is very very slow

Asked by shahzad73 in Active Server Pages (ASP)

Tags: , ,

Hi,

My team is trying to connect with a secure internet directory contents in classic ASP code. The FTP is connecting with user name and password. but it takes a lot of time (15 minutes) just to download a simple xml file. if i access the same directory with IE browser. it asks user name and password and when i enter it it logs in the directoy and shows the directory listing. if i then download a file from IE it takes only 5 seconds to download 70KB XML file. so the question why the classic ASP code taking so much time.

one thing that is the directory contains a lot of XML file around 800,000 so when i connect with IE to the directory then it takes a lot of time displying the whole directory contents. IS IT THE CASE with FTP connection in ASP code that it is also downloading that directory contents.

ASP code is give below

Shahzad Aslam






' Build our ftp-commands file
Set objTextFile = objFSO.CreateTextFile(Server.MapPath("test.ftp"))

objTextFile.WriteLine "lcd " & Server.MapPath(".")
objTextFile.WriteLine "open " & ftp_address
objTextFile.WriteLine ftp_username
objTextFile.WriteLine ftp_password

' Check to see if we need to issue a 'cd' command
If ftp_remote_directory <> "" Then
   objTextFile.WriteLine "cd " & ftp_remote_directory
End If

objTextFile.WriteLine "prompt"

' If the file(s) is/are binary (i.e. .jpg, .mdb, etc..), uncomment the following line
  objTextFile.WriteLine "binary"

' If there are multiple files to put, we need to use the command 'mput', instead of 'put'
If Instr(1, ftp_files_to_put, "*",1) Then
   objTextFile.WriteLine "mput " & ftp_files_to_put
Else
   objTextFile.WriteLine "put " & ftp_files_to_put
End If

objTextFile.WriteLine "bye"

objTextFile.Close
Set objTextFile = Nothing

' Use cmd.exe to run ftp.exe, parsing our newly created command file
strCMD = "ftp.exe -s:" & Server.MapPath("test.ftp")
strTempFile = "C:\" & oFileSys.GetTempName( )

oFileSys.copyfile ftp_address & ftp_remote_directory & ftp_files_to_put , "c:\1011.xml"Start Free Trial
[+][-]06.12.2007 at 07:12AM PDT, ID: 19266220

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.12.2007 at 09:16AM PDT, ID: 19267483

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.14.2007 at 04:55AM PDT, ID: 19282441

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.14.2007 at 04:56AM PDT, ID: 19282449

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.14.2007 at 05:49AM PDT, ID: 19282812

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: asp, ftp, code
Sign Up Now!
Solution Provided By: L00M
Participating Experts: 2
Solution Grade: C
 
 
 
Loading Advertisement...
20080716-EE-VQP-32