0

We were able to send JSONdata as string to a webservice from windows 8.1 machine. But on Windows 10 machine, the JSON data is not correctly sent to the service. A part of the data is getting truncated and because of which the server throws 400 error. On debugging, the JSONdata in JSON viewer in visual Studio 2015 shows the data correctly but when viewed in Text Visualizer, it does not show all the data. Also copying the data from string and pasting it to the notepad, half the data is truncated. The serialization is done using the Nuget packages for Newtonsoft.Json , version 6.0.8.

Has anyone faced any similar issue ? Seems very lame though, but still cannot figure out the problem. Please help.

Thanks and Regards, Akhila

Akhila
  • 1
  • 1

1 Answers1

0

Since I can not add a comment I shall write the answer. Since you have mentioned that it is a large Json data the reason might be some machine limitations. You can look the following link to make sure about the size of the string or memory used:

What is the maximum possible length of a .NET string?

Community
  • 1
  • 1
  • Thanks @Vasudevan, But when i mean large its just 200 KB i am talking about. not more than that. and same amount of data going through on a windows 8.1 machine. But failing on a windows 10 machine. :( – Akhila Jan 28 '16 at 10:04
  • @Akhila Did you try using stringbuilder to save the serialized json data and pass to webservice by calling ToString() method of stringbuilder? – Vasudevan Badiadka Jan 29 '16 at 12:57
  • Hi @Vasudevan, I have tried using the string builder but with no luck. Also I wanted to mention that the service we use is asmx here. Could that have a limitation on windows 10. Just guessing as I am not able to find any help on it online. Also, when the service instance is created, we are getting this type of an error in the intellisense Channel = Obtaining the runtime type of a transparent proxy is not supported in this context. This is not the case on windows 8.1 device. Could this impact ? absolutely clueless :( – Akhila Feb 02 '16 at 07:11