We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Maximum request length exceeded.

Thread ID:

Created:

Updated:

Platform:

Replies:

129900 Apr 7,2017 10:33 PM UTC Apr 11,2017 05:16 AM UTC ASP.NET MVC 3
loading
Tags: Grid
jaime
Asked On April 7, 2017 10:33 PM UTC

Hi I have a problem when I try to export to excel a grid with more than 4000 records, when I render the grid I have the save problem but I increase MaxJsonLength in Json result, but when I try to export to excel I got  Maximum request length exceeded error

Thanks in advance



Attachment: codegrid_91eab66e.rar

Prasanna Kumar Viswanathan [Syncfusion]
Replied On April 10, 2017 10:52 AM UTC

Hi Jaime, 

Thanks for contacting Syncfusion support. 

We checked in our sample and when we export to excel with more than 4000 records we did not face any maximum request length exceeded error in our sample. For your convenience we attached a sample and please download the sample from the following link 


In your code example we found that you have deserialize the values to get the data. We will face the mentioned issue when we deserialize the more than 5000 records in the Grid. To avoid this issue we need to divide the rows into two or three and serialize the values. After we serialize the values we need to combine the whole data into a list.   

Find the code example:  


for (var i = 0; i < rowPartition; i++)  
 {  
   string griddata = serializer.Serialize(rows.Skip(i * 2000).Take(2000));  
   var data = serializer.Deserialize<List<Summary>>(griddata);  
   Data.AddRange(data);  
}  
ViewBag.datasource = Data;  


Regards, 
Prasanna Kumar N.S.V 
 


jaime
Replied On April 10, 2017 05:24 PM UTC

Hi thanks for your response, your grid was ok, My issue was due to IIS's preset upload limit.
Adding the following to web.config resolved the issue.

<system.web>
<httpRuntime executionTimeout="100000" maxRequestLength="214748364" />
</system.web>

Thanks for your support

Prasanna Kumar Viswanathan [Syncfusion]
Replied On April 11, 2017 05:16 AM UTC

Hi Jaime, 

We are happy to hear that your issue has been resolved.  

Please let us know if you need any further assistance. 

Regards, 
Prasanna Kumar N.S.V 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;