Solved

FTP error from VB using WinInet API

Posted on 2002-07-03
3
980 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now