Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
228 Beiträge
 
#3

AW: Download einer Datei

  Alt 8. Nov 2023, 08:00
Ich habe bislang immer UrlDownloadToFile bzw. URLDownloadToCacheFile verwendet, um auf bestimmte Daten im Internet zuzugreifen. Unter anderem zum Download von Programmupdates.
Das hat auch problemlos funktioniert und funktioniert auch noch weiterhin auf Desktop-Rechnern.
Aber auf aktuellen Windows Servern funktioniert das nicht mehr.

Ich erhalte nach dem Aufruf eine Rückgabewert
2148270088 bzw. INET_E_DOWNLOAD_FAILURE

Ich vermute, dass da der Internet Explorer und somit die Funktion nicht mehr funktioniert.

Ich habe danach nach Alternativen gesucht, aber bin nicht richtig fündig geworden.
Für Textdateien haben ich InternetReadFile gefunden, was sehr gut funktioniert, aber wenn ich binär-Dateien (Setup) herunterladen will, dann passt das nicht. Wahrscheinlich irgendein falsches Setting.
I don't think it is Internet Explorer problem or even OS problem, my experience with Windows Servers is that security is always going stricter with each version.
You are using the OS InternetReadFile to download this will invoke OS network layer, these have a default security settings and policy, it is not only Firewall but what content you can downloaded, in most Windows Servers the Defender is disabled by default as it will hinder the OS, but the OS expects the User/Administrator for such platform to be experienced enough to set it right, so instead of depending on Defender they use many other settings to establish the defense line to prevent most critical settings that many just miss or not know about.

I don't know what version you are talking about, but i am sure it is some policy somewhere.
On other hand you can ditch INet and switch to any other library to perform download, Indy/ICS/RTC...
but still you can search for the such policy and change it, i have no idea where is it, sorry !
  Mit Zitat antworten Zitat