locked
Help: Upload XML to server RRS feed

  • Question

  • Hello, I have a Silverlight application that runs on a linux server, so it only has php. My application accesses an xml file on the server and then allows the user to manipulate the content of the xml file. I need the application to be able to upload a modified xml file back to the server. I have searched through the forums and I have read about using WCF, but I dont know how to do it, or if it is what I want. Any help is appreciated.

    Sunday, February 1, 2009 11:40 AM

Answers

All replies

  • To save the xml file on the server you need to send the updated xml back to the server via a web service and the web service will save it on the server.  I do not know php so I can not give you an example of how to do this but hopefully this will help get you started
    Sunday, February 1, 2009 12:12 PM
  • Hey,

    If you want to learn about how to create WCF for silverlight.Following links will help you a lot

    http://www.dotnetcurry.com/ShowArticle.aspx?ID=228&AspxAutoDetectCookieSupport=1

    http://www.netfxharmonics.com/2008/11/Understanding-WCF-Services-in-Silverlight-2

    http://msdn.microsoft.com/en-us/library/cc197940(VS.95).aspx

    Hope this bails you out.

    Kindly mark the post as answer if it solved your problem

    CHeers..!

    Sunday, February 1, 2009 12:27 PM
  • You can use  WebClient or HttpWebRequest to implement the standard HTTP POST method to upload any data to webserver. Then, you can use any standard method of your web server platform, include PHP,  to receive the POST request.

     

    There is an example in the link to implement the above method in C# and PHP,

    http://www.codeproject.com/KB/cs/uploadfileex.aspx

    However, the above example is not exactly a Silverlight example. It is stardard Dotnet app in the C# side.

    However,  Silverlight also can implement the similar function but may require more lines of code.

     

    Sunday, February 1, 2009 9:07 PM