Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2004, 06:32 AM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with FTP connection behind a proxy

Hello,

I'm trying to write a function that connect to an FTP sever via a proxy.
I use the following code :

lgSession = InternetOpen("FTP connection", INTERNET_OPEN_TYPE_PROXY, proxyname, vbNullString, 0)
If lgSession Then
    lgInternet = InternetOpenUrl (lgSession, "ftp://servername/filename.doc", vbNullString, 0, INTERNET_FLAG_NO_CACHE_WRITE, 0)
    If lgInternet Then
        Do
            inRes = InternetReadFile(lgInternet, stBuf, 1024, lgRet)
        Loop While (lgRet <> 0)
    End If
        inRes = InternetCloseHandle(lgInternet)

But, i have always variable "inRes" equal to zero.
When I use explorer with ftp://servername/filename.doc, the file is downloaded correctly, but when using the code, no success to read the file.
Anybody know the problem.
Many thanks!!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue in Upload/download FTP file via Proxy C#.NET naveenh C# 3 June 20th, 2008 08:51 AM
Cast Problem in Web service proxy Amit_Topper Crystal Reports 0 January 20th, 2007 03:28 AM
FTP connection to a Proxy ajaypsingh Pro Java 0 July 14th, 2006 06:36 AM
FTP Problem Ben Horne Dreamweaver (all versions) 2 September 21st, 2004 07:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.