[Mono-dev] WebClient.DownloadFile doesn't work on Windows

Andoni Morales ylatuya at gmail.com
Thu Apr 23 06:38:24 EDT 2009


I'm trying to implement an updates notifier for my program. It
downloads an XML file describing to latest version using
"WebClient.DownloadFile" and compares the actual version number with
the one installed
(https://forja.rediris.es/plugins/scmsvn/viewcvs.php/LongoMatch/trunk/LongoMatch/Updates/Updater.cs?root=csl-longomatch&rev=637&view=markup).
On Linux everything works fine, but on Windows I get the following
exception:

System.Net.WebException: An error occurred performing a WebClient
request. ---> System.NotSupportedException:
http://www.ylatuya.es/updates/version.xml
  at System.Net.WebRequest.GetCreator (System.String prefix) [0x00000]
  at System.Net.WebRequest.Create (System.Uri requestUri) [0x00000]
  at System.Net.WebClient.SetupRequest (System.Uri uri) [0x00000]
  at System.Net.WebClient.DownloadFileCore (System.Uri address,
System.String fileName, System.Object userToken) [0x00000]
  at System.Net.WebClient.DownloadFile (System.Uri address,
System.String fileName) [0x00000]
  --- End of inner exception stack trace ---
  at System.Net.WebClient.DownloadFile (System.Uri address,
System.String fileName) [0x00000]
  at System.Net.WebClient.DownloadFile (System.String address,
System.String fileName) [0x00000]
  at (wrapper remoting-invoke-with-check)
System.Net.WebClient:DownloadFile (string,string)
  at LongoMatch.Updates.Updater.FetchNewVersion () [0x00000]



BTW, I'm using Mono-2.4.

Regards,

Andoni Morales Alastruey


More information about the Mono-devel-list mailing list