0

I am facing an issue where the JSON serialization fails when their is a large chunk of data to be posted to the controller. Using the code provided in the following link:

JsonValueProviderFactory throws "request too large"

Now, there is an amount of delay when the data reaches the controller method. I debugged the same, and there is a delay of around 4-5 minutes. My data size is 1.5MB.

Is this due to the size of the data?

Any help is highly appreciated.

Community
  • 1
  • 1
  • The "request too large" error would be an indication that you try to use a GET request. Use POST requests for large chunks of data. If you send binary data, don't use JSON as the transport mechanism. – Tomalak Jul 05 '16 at 11:39
  • I am using POST request only.. What is meant by binary data in this case? – Sudip Arora Jul 05 '16 at 13:05
  • An image, audio or any other sort of BLOB. Converting them to JSON is costly on the client, wastes bandwidth during transfer and is costly on the server, who needs to convert it back. – Tomalak Jul 05 '16 at 13:12
  • 1
    Well i am not using any of them.. Mostly int and strings.. – Sudip Arora Jul 06 '16 at 01:52

1 Answers1

0

For those who face this error, the solution provided in the below link worked for me:

http://erraticdev.blogspot.in/2010/12/sending-complex-json-objects-to-aspnet.html