Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wininet proxy
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00675268
Message ID:
00675526
Vues:
9
Why are you using INTERNET_INVALID_PORT_NUMBER? You should be using INTERNET_DEFAULT_FTP_PORT.

InternetOpenUrl uses default settings when it connects and makes a best guess, while when you use the lower level methods you have to configure everything. Hard to tell what's wrong - look at the error messages.

You should play around with the various connection types in InternetOpen(). Try using the Proxy or IE configuration options which do semi-automatic config for proxy servers.

+++ Rick ---

>Hallo again,
>
>i try to get a file over a proxy via wininet.dll. If i use the thing like:
> lcServer = "www.alpha-getraenke.de" && add no http:// before
> hSession = InternetConnect (hOpen,;
> lcServer,;
> INTERNET_INVALID_PORT_NUMBER, "", "",;
> INTERNET_SERVICE_HTTP, 0, 0)
> lzurl = ("ftp://user:password@www.alpha-getraenke.de/BILDER/lenz2.jpg")
> * get a handle of the remote file
> hFile = InternetOpenUrl(hOpen ,;
> lzurl , "", 0,;
> INTERNET_FLAG_NEED_FILE, 0)
>i get the file, but if i try to take this:
> strHost = "www.alpha-getraenke.de"
> strUser = "user" && this user name is accepted almost everywhere
> strPwd = "password" + SYS(3) + "@alpha-getraenke.de"
>
> * connecting to the FTP
> hFtpSession = InternetConnect (hOpen, strHost,;
> INTERNET_INVALID_PORT_NUMBER,;
> strUser, strPwd,;
> INTERNET_SERVICE_FTP, 0, 0)
> * downloading a file from the FTP
> * no check whether the target file exists
> lpszRemoteFile = "/BILDER/lenz2.jpg" && if it still exists
> lpszNewFile = "c:\sicher\lenz2.jpg" && check the destination folder
> fFailIfExists = 0 && do not stop if the target already exists
> dwContext = 0
> lnResult = FtpGetFile (hFtpSession, lpszRemoteFile, lpszNewFile,;
> fFailIfExists, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_BINARY,;
> dwContext)
>
>there is nothing happens, is it possible that i can not get or put some files over the ftp protocol over a proxyserver. Who can help me please. I dont will use westwind or marby stuff.
>
>Best regards Lorenz
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform