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

Petit Eric surfzoid at gmail.com
Thu Apr 23 08:03:56 EDT 2009


I had same kind of problem when writed MonoOSC, you can find my
solution in source of it, but guess it will be too more compliceted
for just dll one file, so i suggest you this more simple one i writed
:
http://clamwinrt.svn.sourceforge.net/viewvc/clamwinrt/ClamWinRTUI/CheckUpdate.cs?revision=27&view=markup


2009/4/23 Andoni Morales <ylatuya at gmail.com>:
> 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
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>



-- 

Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
If one day one reproaches you that your work is not a work of
professional, say you that:
Amateurs built the arch of Noah, and professionals the Titanic.
---------------------------------------------------------------------------

Few people are done for independence, it is the privilege of the powerful ones.
---------------------------------------------------------------------------

No key was wounded during the drafting of this message.


More information about the Mono-devel-list mailing list