|
|
|
start date: Wed, 15 Aug 2007 02:07:12 +0300,
posted on: microsoft.public.dotnet.framework
back
| Thread Index |
|
1
Yehia A.Salam
|
|
2
Vadym Stetsiak
|
|
3
Yehia A.Salam
|
|
4
Vadym Stetsiak
|
|
5
UL-Tomten
|
DownloadFileAsync
Hello,
DownloadFileAsync blocks (or hangs) the application for 3 or 4 seconds if
there is no internet connection available, the expected behavior should be
to continue normally and raise the error in the DownloadFileCompleted event
in AsyncCompletedEventArgs, however this is not the case.
Thanks
Yehia
Date:Wed, 15 Aug 2007 02:07:12 +0300
Author:
|
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 seconds
YA> if there is no internet connection available, the expected behavior
YA> should be to continue normally and raise the error in the
YA> DownloadFileCompleted event in AsyncCompletedEventArgs, however this is
YA> not the case.
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com
Date:Wed, 15 Aug 2007 17:58:25 +0300
Author:
|
Re: DownloadFileAsync
yes it does, but how would this matter?
----- Original Message -----
From: "Vadym Stetsiak"
Newsgroups: microsoft.public.dotnet.framework
Sent: Wednesday, August 15, 2007 5:58 PM
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 seconds
> YA> if there is no internet connection available, the expected behavior
> YA> should be to continue normally and raise the error in the
> YA> DownloadFileCompleted event in AsyncCompletedEventArgs, however this
> is
> YA> not the case.
>
>
> With best regards, Vadym Stetsiak.
> Blog: http://vadmyst.blogspot.com
>
Date:Thu, 16 Aug 2007 01:05:38 +0300
Author:
|
Re: DownloadFileAsync
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"
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
Date:Thu, 16 Aug 2007 11:36:42 +0300
Author:
|
Re: DownloadFileAsync
On Aug 16, 10:36 am, "Vadym Stetsiak" wrote:
> If there is a host name in the url, API tries to resolve that hostname [...]
According to MSDN, "This method does not block the calling thread".
Maybe the setup (including DNS resolution, web request creation etc)
should be non-blocking as well, or the documentation changed.
Date:Thu, 16 Aug 2007 01:54:09 -0700
Author:
|
|
|