tags:

views:

27

answers:

1

I was using the following code to readn in an xml file into my silverlight application and display it on a datagrid, this worked fine with visual web developer 2010

WebClient xmlClient = new WebClient();

xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded);
xmlClient.DownloadStringAsync(new Uri("chart.xml", UriKind.RelativeOrAbsolute));

but I have had to downgrade to visual studio 2008 sp1 and silverlight 3 and the same code does not work in it. I don't get any errors, it runs but the datagrid stays blank. After some debugging I have noticed that XMLFileLoaded function is never being called.

what are the possibilities here? The datagrid does work with other data, I have tried several different paths for my xml file, only thing that I can think of is that silverlight 3 does not support this, but the IDE does not give me any error when i make these objects so it must be something else

edit:

after putting the above in a try catch and printing exception.ToString() I get nothing, printing exception.InnerException gives me System.Net.DownloadStringCompletedEventArgs

A: 

I can't see anything wrong but I would suggest you download a copy of fiddler to see for yourself what exacly is communicated between client and server.

AnthonyWJones