views:

29

answers:

2

Hi, I use Silverlight 3 and .net framework 3.5. I want to send xml data to server on click of a button. On googling i found that we can use WebClient Class's UploadStringAsync method.

I am posting data to a web service running under local IIS. All that is fine but how do i capture the data posted on the service?

A: 

Capture for diagnostic/debugging purposes? Try WireShark or Fiddler.

HTH,
Kent

Kent Boogaart
Actually I want to further process the XML and save it with the web service. I am able to submit the data with post but how to capture the data on the web service?
Amit
A: 

Following code reads the post data which can further be processed.

using (System.IO.StreamReader sr = new System.IO.StreamReader(context.Request.InputStream))
        {
            string t = sr.ReadToEnd();
        }
Amit