1

Topic: Record JSON by request of the big text.

Kind time of days! There is project MVC 3, difficult enough page with the big tree of composition of a product. At relocation on a tree the user can fill certain parameters, in which number and a certain comment. The comment concerns all product its record is produced by the separate button. The field size is not restricted anywhere. The problem in that that, at excess of the size of the given comment at attempt to transfer in its parameter in  request it falls and does not fulfill. Setting  an amount of fields on the form I already found web config parameter (for there were cases when the model contained  10 records), the parameter setting in the data which can   - too.
And here restriction on the size of parameter which it is possible to transfer  persistently I do not find.... And attempts to copy in the comment War and peace are stopped.

2

Re: Record JSON by request of the big text.

denis_viktorovich;
How many characters it is necessary to transfer?
Since happens also basis it is necessary to redesign from for field size exceedings.

3

Re: Record JSON by request of the big text.

denis_viktorovich;

<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength = "300000"/>
</webServices>
</scripting>
</system.web.extensions>

The item with. But I still would make restriction

4

Re: Record JSON by request of the big text.

denis_viktorovich;
You on get or on Post transfer?
With what falls?

5

Re: Record JSON by request of the big text.

monstrU;
I transfer in GET, an error caught.

HTTP Error 404.15 - Not Found
The unit of a filtration of requests is adjusted so that not to pass too long lines of requests.

6

Re: Record JSON by request of the big text.

denis_viktorovich;
That in general it is not clear, since <httpRuntime maxRequestLength = "1048576"/>

7

Re: Record JSON by request of the big text.

Petro123;
From basis nvarchar (max)

8

Re: Record JSON by request of the big text.

denis_viktorovich wrote:

monstrU;
I transfer in GET, an error caught.

HTTP Error 404.15 - Not Found
The unit of a filtration of requests is adjusted so that not to pass too long lines of requests.

I congratulate. You got for the size of restrictions get request.
As you think, how many the data it is as much as possible possible to transfer in a line of the address (get request as at you)
On Post I think you all will transfer

9

Re: Record JSON by request of the big text.

denis_viktorovich wrote:

I transfer in GET.

and it is necessary post/ajax
At sending on the server.
Get reading from the server.

10

Re: Record JSON by request of the big text.

The button with type submit the automatic machine goes on post all fields of the form on the server.

11

Re: Record JSON by request of the big text.

monstrU;
Added <requestLimits maxQueryString = "1000000"/> now writes Status Code: 400 Bad Request

12

Re: Record JSON by request of the big text.

denis_viktorovich wrote:

monstrU;
Added <requestLimits maxQueryString = "1000000"/> now writes Status Code: 400 Bad Request

Here it is interesting, like wrote that it is necessary to transfer on post? And long you to be stuck into all known and unknown holes will be?

13

Re: Record JSON by request of the big text.

monstrU wrote:

it is passed...
Here it is interesting, like wrote that it is necessary to transfer on post? And long you to be stuck into all known and unknown holes will be?

Yes, thanks. I initially changed in the controler on [AcceptVerbs (HttpVerbs. Post)] actually predictably the effect was not. And on to was in JS to change $.getJSON on $.post. (Confused still that the method $.PostJSON is not present smile)

14

Re: Record JSON by request of the big text.

denis_viktorovich wrote:

it is passed...
Yes, thanks. I initially changed in the controler on [AcceptVerbs (HttpVerbs. Post)] actually predictably the effect was not. And on to was in JS to change $.getJSON on $.post. (Confused still that the method $.PostJSON is not present smile)

You see that happens when try to sort out at random the methods, which autosubstitution of studio offers.
If esteemed the documentation would find a method $. post
And so I hammered on these methods and I use general-purpose type of it is as that easier call arguments to specify
$.ajax ({
method: ' POST ';
type: ' POST ';
url: ' url ';
contentType: ' application/json; charset=utf-8 ';
data: JSON.stringify (sendObj);
cache: false;
traditional: true;
dataType: ' json'
})
.success (function (data) {
if (data. Success === true) {
if (typeof (callback) === ' function ') {
callback (data);
}
} else
alert (");
})
.fail (function (e) {
alert (");
});