Vadym
Thu Aug 16 03:36:42 CDT 2007
Hello, Yehia!
If there is a host name in the url, API tries to resolve that hostname into
an IP address (DNS) and only then perform connection.
If there is an IP address specified - API tries to connect to it without
resolution.
The lag of 3 or 4 seconds can be due to this resolution process.
You wrote on Thu, 16 Aug 2007 01:05:38 +0300:
YA> yes it does, but how would this matter?
YA> ----- Original Message -----
YA> From: "Vadym Stetsiak" <vadmyst@gmail.com>
YA> Newsgroups: microsoft.public.dotnet.framework
YA> Sent: Wednesday, August 15, 2007 5:58 PM
YA> Subject: Re: DownloadFileAsync
>> Hello, Yehia!
>> Does the url that is passed to DownloadFileAsync contain host name?
>> If that is so, try using IP address instead hostname, e.g.
>>
http://10.2.2.1/file.text
>> You wrote on Wed, 15 Aug 2007 02:07:12 +0300:
YA>>> DownloadFileAsync blocks (or hangs) the application for 3 or 4
YA>>> seconds if there is no internet connection available, the expected
YA>>> behavior should be to continue normally and raise the error in the
YA>>> DownloadFileCompleted event in AsyncCompletedEventArgs, however
YA>>> this
>> is
YA>>> not the case.
>> With best regards, Vadym Stetsiak.
>> Blog:
http://vadmyst.blogspot.com
With best regards, Vadym Stetsiak.
Blog:
http://vadmyst.blogspot.com