allnaturaldmt
December 1st, 2008, 03:32 PM
Hey guys, I have been trying to load XML data into Silverlight for a few days now, and I keep getting this error:
"The URI prefix is not recognized."
I have the XML file as a resource, set to Copy always, and I see it there, but when I use this code:
WebClient xmlClient = new WebClient();
xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded) ;
xmlClient.DownloadStringAsync(new Uri("xml/sampleXML.xml", UriKind.RelativeOrAbsolute));
I get the error every time. Am I missing something? I searched around google to see what the URI Prefix is not recognized means, but I cant find anything.
thanks so much!
Ohh yea, also, when i try to load an XML file from my webServer (while testing locally) it throws a Security Error...do i need to do something special to the XML file or make a crossdomain.xml file or something to get it to work?
"The URI prefix is not recognized."
I have the XML file as a resource, set to Copy always, and I see it there, but when I use this code:
WebClient xmlClient = new WebClient();
xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded) ;
xmlClient.DownloadStringAsync(new Uri("xml/sampleXML.xml", UriKind.RelativeOrAbsolute));
I get the error every time. Am I missing something? I searched around google to see what the URI Prefix is not recognized means, but I cant find anything.
thanks so much!
Ohh yea, also, when i try to load an XML file from my webServer (while testing locally) it throws a Security Error...do i need to do something special to the XML file or make a crossdomain.xml file or something to get it to work?