0

We have webservice in client network which accepts input XML as query string parameter and returns response as XML. The input XML is generated using the data that is fetched from database.

I have created one Console application which generates the XML and sends the XML in URL parameter to webservice using HttpWebRequest. The problem is if the generated XML has more than ~7K characters I am getting this exception:

"The underlying connection was closed: An unexpected error occurred on a receive."

However if I use XMLHttpRequest in javascript I am not getting any error. Please let me know how to pass the large XML to webservice in console application.

daniele3004
  • 13,072
  • 12
  • 67
  • 75
Dinesh
  • 31
  • 1
  • 3
  • Show what you already have. – Renatas M. Nov 13 '14 at 07:09
  • You can't use that much characters into query string. There are limitations for example for IE the maximum URL length is around 2083 characters (might depend of IE version too). – Alex Nov 13 '14 at 07:13
  • What is your client ?? Asp.net, Winform or other? – daniele3004 Nov 13 '14 at 07:15
  • It seems that in IIS there is a possibility to change those limits. See http://stackoverflow.com/questions/10797573/how-to-increase-the-max-length-of-url for more details. – Alex Nov 13 '14 at 07:20

0 Answers0