WebClient

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
CyborgDE
Posts: 75
Joined: Wed Aug 12, 2015 9:21 pm

WebClient

Postby CyborgDE » Mon Nov 02, 2015 11:14 pm

Hello,

you make me crazy :-)

Code: Select all

                var webClient = new WebClient();
                webClient.Headers[HttpRequestHeader.Accept] = "text/xml";
                webClient.Encoding = Encoding.UTF8;
                webClient.DownloadStringCompleted += Load_DownloadStringCompleted;
                webClient.DownloadStringAsync(new Uri("http://" + IP + "/app/nothing.xml"));

Code: Select all

        void Load_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
                WebClient webClient = sender as WebClient;
                if (webClient == null)
                {
                    throw new ArgumentException("No WebClient !");
                }
         }

Under JavaScript I got the Exception !!!

Regards, Uwe

CyborgDE
Posts: 75
Joined: Wed Aug 12, 2015 9:21 pm

Re: WebClient

Postby CyborgDE » Tue Nov 03, 2015 12:36 am

If the server ist unavailable, in got no Load_DownloadStringCompleted event under JavaScript ...
Last edited by CyborgDE on Tue Nov 03, 2015 4:02 am, edited 1 time in total.

CyborgDE
Posts: 75
Joined: Wed Aug 12, 2015 9:21 pm

Re: WebClient

Postby CyborgDE » Tue Nov 03, 2015 4:02 am

Also no exception in DownloadStringTaskAsync ...


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 29 guests

 

 

cron