Note that there are some explanatory texts on larger screens.

plurals
  1. POGeneric handler parameter size limit?
    primarykey
    data
    text
    <p>I have some JavaScript code which generates a very long script and than posts it back to the server to a generic handler for creating a csv.</p> <p>My JavaScript Code for sending the data is:</p> <pre><code>function postwith(to, p) { var myForm = document.createElement("form"); myForm.method = "post"; myForm.action = to; for (var k in p) { var myInput = document.createElement("input"); myInput.setAttribute("name", k); myInput.setAttribute("value", p[k]); console.log(k+":"+p[k]); myForm.appendChild(myInput); } document.body.appendChild(myForm); myForm.submit(); document.body.removeChild(myForm); </code></pre> <p>}</p> <p>In my console I can see that the entire string is added to the form ("console.log(k+':'+p[k]);" so the client side seems to work ok.</p> <p>In the network view where I examine the request/response I can see that "Content" (the name of the form data attribute) is not complete - it is cut in the middle.</p> <p>The server side is very simple - sends back the content as csv:</p> <pre><code>public class Excel : IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/csv"; context.Response.AddHeader("Content-Disposition", "attachment; filename=" + context.Request["Report"] +System.DateTime.Now.Ticks+ ".csv"); string content = context.Request["Content"]; content = content.Replace(";", System.Environment.NewLine); System.Text.UTF8Encoding uc = new System.Text.UTF8Encoding(true); context.Response.Output.WriteLine(content); context.Response.End(); } public bool IsReusable { get { return false; } } </code></pre> <p>}</p> <p>MY guess is the server needs to be configured somehow to allow larger posts...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload