views:

29

answers:

0

In our application we use Silverlight on the client-side. It downloads data from the server using WebClient:

WebClient wcGetDataFundSet = new WebClient();
wcGetDataFundSet.OpenReadCompleted += (s, e2) =>
{
    // Do something with the data.
};
wcGetDataFundSet.OpenReadAsync(new Uri(this.uriString));

When I open this.uriString in the browser, correct result is displayed. On another developer's machine everything works just fine. On mine delegate doesn't even fire. Tried using "http://google.com/index.html" and some other URLs. It worked, but e2.Result threw an exception of type 'System.Reflection.TargetInvocationException'. Then I changed code to this and it worked:

WebClient wcGetDataFundSet = new WebClient();
wcGetDataFundSet.DownloadStringCompleted += (s, e2) =>
{
    // Do something with the data.
};
wcGetDataFundSet.DownloadStringAsync(new Uri(this.uriString));

Windows XP SP3, Visual Studio 2010 and IE 8 on every machine. Do you have any ideas where the problem was? Thanks in advance.