Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2004.07.11;
Скачать: [xml.tar.bz2];

Вниз

Загрузить файл из интернет через прокси требующий авторизации.   Найти похожие ветки 

 
gedd ©   (2004-05-11 12:52) [0]

Люди помогите загрузить файл из интернет через прокси требующий авторизации.

Пробовал например такой код:


DownloadFile("http://some.com/some.zip", "c:\some.zip");

function DownloadFile(const FileURL, FileName: String): Cardinal;
var
 hSession, hFile: HInternet;
 Buffer: array[1..1024] of Byte;
 BufferLen, fSize: LongWord;
 f: File;
begin
 Result := 0;
 hSession := InternetOpen("STEROID Download",
                          INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
 if Assigned(hSession) then begin
   hFile := InternetOpenURL(hSession, PChar(FileURL), nil, 0,
                            INTERNET_FLAG_RELOAD, 0);
   if Assigned(hFile) then begin
     AssignFile(f, FileName);
     Rewrite(f,1);
     fSize := 0;
     repeat
       InternetReadFile(hFile, @Buffer, SizeOf(Buffer), BufferLen);
       BlockWrite(f, Buffer, BufferLen);
       fSize := fSize + BufferLen;
     until (BufferLen = 0);
     CloseFile(f);
     Result := fSize;
     InternetCloseHandle(hFile);
   end;
   InternetCloseHandle(hSession);
 end;
end;


 
gedd ©   (2004-05-11 12:54) [1]

Чуть на забыл
Прокси ISA 2000.


 
gedd ©   (2004-05-11 12:58) [2]

Вместо файла возвращается страничка вот стаким содержанием

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Click the Refresh button, or try again later.

Open the Web site home page, and then look for links to the information you want.
If you typed the page address in the Address bar, make sure that it is spelled correctly.

Verify that the Internet access policy on your network allows you to view this this page.
If you believe you should be able to view this directory or page, please contact the Web site administrator by using the e-mail address or phone number listed on the Web site home page.
HTTP 407 Proxy Authentication Required - The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. (12209)
Internet Security and Acceleration Server

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Background:
The gateway could not retrieve the requested page.

ISA Server: delphi.kaustik.local
Via:

Time: 11.05.2004 8:56:24 GMT  



 
gedd ©   (2004-05-14 07:42) [3]

Может кто нибудь что нибудь знает из близкой области?



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2004.07.11;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.035 c
1-1087997689
XeLax
2004-06-23 17:34
2004.07.11
преобразовать строку


1-1087902478
cdadmitriy
2004-06-22 15:07
2004.07.11
Как перерисовать один NODE in TTreeView без изменения текста


3-1087119568
Axelrodm
2004-06-13 13:39
2004.07.11
Чтение курсора (c BLOB )из Хранимой процедуры ORACLE в BDE


1-1088216448
x_byte
2004-06-26 06:20
2004.07.11
webbrowser и его parent


1-1088320850
georg
2004-06-27 11:20
2004.07.11
создание объектов





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский