Solved

FTP error from VB using WinInet API

Posted on 2002-07-03
3
985 Views
Last Modified: 2012-06-27
Hello,

Tech: VB, IIS, WinInet API

I am implemeting FTP Asynchronously using WinInet dll. But sometimes I am receiving a error either sending files or retriving files.

The error number is 12031 (retrieved from Err.LastDLLError) and the Error documentation in the microsoft site says "The connection with the server has been reset".

Can you pls. tell me what does that error means? Is there a way to fix the above error?

Thanks.
0
Comment
Question by:soni1978
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 200 total points
ID: 7127460
Did you see these articles:

INFO: Using WinInet APIs Asynchronously Within Visual Basic (Q189850)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q189850

Also:
Win32 Internet HTTP Functions in Visual Basic
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebtool/html/msdn_vbhttp.asp

and I quote:
<quote>
The WinInet API also provides FTP and Gopher functions; however, the WinInet SDK documentation indicates that these functions are best suited to asynchronous use, and Visual Basic requires third-party tools to use asynchronous functions and callbacks. Therefore, this article focuses on HTTP functions, which can safely be called synchronously. (For a look at how you would use the FTP functions asynchronously using Visual C++®, please refer to Robert Coleridge's article, Advanced FTP: Teaching Fido to Phetch.
</quote>

Anthony
0
 

Author Comment

by:soni1978
ID: 7127739
I did see the articles.

The problem now is, it runs for most of the times but sometime it gives errors. Any suggestions are welcomed

Thanks.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7127774
No idea.  I gave up attempting to write it asynchronously and instead came up with a synchronous solution.  In any case, there are far better commercial products that are more robust than anything you or I could devise.  In my case, I had some extra time on my hands and welcomed the challenge.  But I would never recommend it for anything "mission critical".

Good luck,
Anthony
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question