Reputation: 5419
Greetings,
I'm trying to read and save to a XML file within a client bin
I've managed to find out how to read a xml file in the clientbin.
Now I want to save to it aswell, when saving, the file already exists in the clientbin.
Uri url = new Uri("myXml.xml", UriKind.Relative);
WebClient client = new WebClient();
#region DownloadStringCompleted
client.DownloadStringCompleted += (s, ea) =>
{
//bla
}
If this is not possible due to limitation then please provide me with a way to copy the file to local machine and be able to change it there.
Many thanks in advance
Upvotes: 0
Views: 810
Reputation: 13039
What are you trying to do is achievable by using an HttpHandler
in server-side, and by creating a HttpWebRequest
in client-side that sends to the handler all the bytes contained in the XML.
There is a good article on CodeProject on how to implement a FileUploader in MVVM. Try to look at the ending part.
Anyway this is not the only solution, if you prefer you can create a WCF Service that do the same job.
Upvotes: 0