Http post data and recieve
hey frnds , i have developed client application on windows mobile 6.5 that retrieves system info . Now i need to post this info on asp.net website which is running on local machine. And later recieve that info. How to do it. I tried many codes but coudnt solve it. Plz help

Micke BlomqvistRank #1,660 · 923 reputationPosted Feb 4, 2011, 2:34 AM EST
Try setting up a webservice in your ASP.NET solution which takes a string or a DataSet as a parameter. String or DataSet depending on the structure of the data you want to receive. Is it in a table format, I would go for the DataSet way.
Add a webservice, create a new public method:
[WebMethod]
public string ReceiveDataFromDevice(System.Data.DatSet dsFromDevice, string DeviceName)
{
//handle the dataset here, for example;
dsFromDevice.WriteXml(Server.MapPath("deviceData_" + DeviceName + ".xml"));
return "save ok";
}
To receive back the data to the device, set up a new public method in your webservice, something like this:
[WebMethod]
public void GetUploadedDataBackToDevice(string DeviceName)
{
//read in the data here, for example
using(System.Data.DataSet ds = new System.Data.DataSet())
{
ds.ReadXml(Server.MapPath("deviceData_" + DeviceName + ".xml"));
return ds;
}
}
I left out all the exception handling, but I guess you'll get the point.
Noel Fernandes3 reputationPosted Feb 4, 2011, 5:35 AM EST
Micke BlomqvistRank #1,660 · 923 reputationPosted Feb 6, 2011, 4:09 AM EST