0

I am having a SOAP style C# webservice. One of the interface methods is given below:

string WebserviceMethod1(string param1, List<T> param2, string param3);

Where T is defined as:

class T { string arg1; string arg2; string arg3; }

One of the consumers of this service, consume it by adding web_references (this is a old style of consuming of webservices, nowadays its much easier to add service_reference. The cconsumer has .Net 2.0) that creates a bunch xsd and xml files. I cannot change the way the service is consumed.

Recently, we have seen an issue, where the service return an bad request (Http Error code:400), if the number of items in the list (second argument) is more than 170. Has anyone ever encountered such an issue? or if someone can point me to some resources that might have a solution.

Thanks in advance ,

Sandy
  • 3
  • 1

2 Answers2

0

Are the strings really long? It's unlikely, but you might be exceeding the maximum serialized data length by which the JavaScriptSerializer abides. See this answer for something to try (to increase the maximum).

Community
  • 1
  • 1
Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
0

You'll be hitting the max request size, asp.net limits the size of the request, and as your List gets longer (or T has more fields) the size of the request to your server gets larger, evntually you'll hit the request size limit that's in ASP.NET. You can override the default in your web.config, see the httpRuntime config element.

superfell
  • 18,780
  • 4
  • 59
  • 81