Solved

FTP error from VB using WinInet API

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 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

10 Experts available now in Live!

Get 1:1 Help Now