DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us