Silverlight Cannot find XML data source
Posted
by Nick
on Stack Overflow
See other posts from Stack Overflow
or by Nick
Published on 2010-03-25T23:33:26Z
Indexed on
2010/03/25
23:53 UTC
Read the original article
Hit count: 421
Silverlight
|asp.net-mvc
Hello..
I am very new to Silverlight development. I understand that this is client side technology therefore the paradyme is differant from that of conventional ASP.NET development. Having said that, I don't understand where my server side code is deployed.
I have a silver light \ MVC application. I am trying to read an XML document from within my 'Models' folder. The following peice of code is executed from within a class that is in the same location as the XML document, 'Models'. The load() results in a SystemIOFileNotFound exception. I noticed that when building the application the XML document is not laid down in the same location as the web project's assembly. I assume this is specific to the fact that this is a Silverlight project. Can someone tell me what I'm missing?
_xdoc = new XDocument();
_xdoc = XDocument.Load(new Uri("videos.xml",UriKind.Relative).ToString());
© Stack Overflow or respective owner