Wcf error There was an error deserializing the object of type System.String. End element 'root' from
try{
WebClient proxy = new WebClient();
byte[] data = proxy.DownloadData("http://localhost:36/Service.svc/GetData");
Stream stream = new MemoryStream(data);
DataContractJsonSerializer obj = new DataContractJsonSerializer(typeof(string));
string result = obj.ReadObject(stream).ToString();
Console.WriteLine(result.ToString());
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
error There was an error deserializing the object of type System.String. End element 'root' from namespace '' expected. Found element 'd' from namespace '
There was an error deserializing the object of type System.String. End element 'root' from namespace '' expected. Found element 'd' from namespace '