title: WebMethod not working when returning relatively large string
body: <p>I am using Virtual Basic with ASP.NET in Visual Studio 2008.  I am using Webmethod to communicate from/to the server with the client.  Data can be queried and returned in small amount, but when I try get a relatively large amount of data, it's returning me a Server 500 error.  My data is 226561 character long, so it's not that large, but it's relatively larger than my other working testing set, which are about 10k character long.</p>
  
  <p>JavaScript:</p>
  
  <pre><code>    PageMethods.my_func("context", success);
      function success(result, userContext, methodName) {
          alert("success!");
      }
  </code></pre>
  
  <p>Failed Virtual Basic Code:</p>
  
  <pre><code>&lt;System.Web.Services.WebMethod()&gt; _
  Public Shared Function my_func(ByVal context As String) As IEnumerable
      var result = "..."  '200k characters long
      Return result
  End Function
  </code></pre>
  
  <p>Successful Virtual Basic Code:</p>
  
  <pre><code>&lt;System.Web.Services.WebMethod()&gt; _
  Public Shared Function my_func(ByVal context As String) As IEnumerable
      var result = "..."  '10k characters long
      Return result
  End Function
  </code></pre>
  
  <p>Is there anything I can change to increase WebMethod returned string length limit?  Is there even a length limit or is it some other problem I could not see?</p>