0

I am uploading a excel data to grid and sending data to server for saving by ajax call but unfortunately getting this error and can't resolved.

I understood this error and had many tried to resolved but no luck

I don't know if i receiving this much data from the server,so why not send to server?

It would be appreciate if anyone can help me out.

Thanks in Advance !

 <security>
  <requestFiltering>
    <!--<requestLimits maxAllowedContentLength="1000000" />-->
    <requestLimits maxAllowedContentLength="2147483647" />
  </requestFiltering>
</security>


   <httpRuntime targetFramework="4.6.1" maxRequestLength="2147483647" executionTimeout="3600" requestLengthDiskThreshold="2147483647" />

Error:

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
Parameter name: input


   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
   at System.Web.Mvc.JsonValueProviderFactory.GetDeserializedObject(ControllerContext controllerContext)
   at System.Web.Mvc.JsonValueProviderFactory.GetValueProvider(ControllerContext controllerContext)
   at System.Web.Mvc.ValueProviderFactoryCollection.GetValueProvider(ControllerContext controllerContext)
   at System.Web.Mvc.ControllerBase.get_ValueProvider()
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor)
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__0(AsyncCallback asyncCallback, Object asyncState)
Bsquare ℬℬ
  • 4,423
  • 11
  • 24
  • 44
AGH
  • 353
  • 1
  • 14
  • I [edited your question](https://stackoverflow.com/help/editing), improving either its formatting, or [its quality](https://stackoverflow.blog/2011/02/05/suggested-edits-and-edit-review/) to help people understanding your question, and to help you to get an appropriate answer. But you still may need to add further information for your question to become fully solvable. – Bsquare ℬℬ Dec 21 '18 at 14:43
  • Have you tried setting a larger value? - see https://stackoverflow.com/questions/1151987/can-i-set-an-unlimited-length-for-maxjsonlength-in-web-config – Sam Dec 21 '18 at 14:53
  • @sam yes I have tried that one also but no luck. – AGH Dec 21 '18 at 17:45

0 Answers0