locked
EXport Data into EXcel more than 30 mb size not working RRS feed

  • Question

  • User911209228 posted

    Hi,

    I have a ASP.net framework 4.5 and IIS version 10.0.My application is deployed in  IIS 10.0.My application is hang and  not responding,When I try to export 70 MB data to Excel from My application in IE 11.Howver noticed that, I am able to export the max 20 mb data to excel in same application in IE 11.How can I resolve this problem and export large size data to excel.

    Note: Able to export same 70 mb data  to excel when I run my application with Visual studio 2013 with default IISExpress.

    Thanks & Regards,

    Dileep S

    Friday, June 19, 2020 8:22 AM

All replies

  • User475983607 posted

    You ask this question as if it this is a common issue. 

    What error do you receive?  Can you share your code and provide an explanation of how the code is expected to function?

    Friday, June 19, 2020 10:57 AM
  • User911209228 posted

    Hi mgebhard,

    not getting any error, application is hanged and no response from IIS server.

    Thanks & regards,

    Dileep S

    Friday, June 19, 2020 11:24 AM
  • User475983607 posted

    Clearly, there is a bug in your application.  You'll need to fix this bug on your own if you are unwilling to provide the source code that reproduces this issue.  

    Friday, June 19, 2020 11:33 AM
  • User911209228 posted

    Hi mgebhard,

    No bug in application. I am able to export  the same data (70 MB) to excel if I run the application in Visual studio 2013 while press  F5.

    Thanks & regards,

    Dillep S

    Friday, June 19, 2020 12:39 PM
  • User475983607 posted

    No bug in application. I am able to export  the same data (70 MB) to excel if I run the application in Visual studio 2013 while press  F5.

    Bugs by definition are unexpected behavior which is what you describe.

    For all we know, you have poor or or non-existent exception handling.  Poor or non-existent logging.   Maybe you have an empty catch block.  We can only speculate without the source code.   

    You said the application hangs.  What does "hang" mean?  Do you have to restart the host to get the application working?  Maybe you are receiving a blank response?  Have you tried using Dev Tools to View the network trace?  Can you explain what steps you are performed?  By the way, what kind of application are you building?  Web forms, MVC, Web API, Core?

    Friday, June 19, 2020 1:19 PM
  • User288213138 posted

    Hi dileep Sanker,

    I have a ASP.net framework 4.5 and IIS version 10.0.My application is deployed in  IIS 10.0.My application is hang and  not responding,When I try to export 70 MB data to Excel from My application in IE 11.Howver noticed that, I am able to export the max 20 mb data to excel in same application in IE 11.How can I resolve this problem and export large size data to excel.

    You can try to change the size of Maximum allowed content length to allow export bigger files in iis.

    You can set this in your IIS Request Filtering setting.

    Best regards,

    Sam

    Monday, June 22, 2020 3:37 AM
  • User911209228 posted

    HI Sam,

    Thanks for your reply.

    Is possible to achieve the same thing  with webconfig settings or ?

    Thanks &Regards,

    Dileep.

    Tuesday, June 23, 2020 12:53 PM
  • User-943250815 posted

    Take a look at this article it has what you looking for https://weblog.west-wind.com/posts/2016/apr/06/configuring-aspnet-and-iis-request-length-for-post-data

    Tuesday, June 23, 2020 1:11 PM
  • User911209228 posted

    Hi Jzero,

    I tried with maxAllowedContentLength  and httpRuntime maxRequestLength setting in Webconfig, but still no luck.

    Thanks & regards,

    DIleep

    Tuesday, June 23, 2020 2:15 PM
  • User-943250815 posted

    @dileep, By "Export" we can assume many different things. It can be just save some data to an Excel file, or it can be make an Excel file in MemoryStream then send back to client as a Download file, or anything else.
    So in your case, what means "Export", suggestions already made, deal with maximum size for post and get.

    With info we have, I think your problem can be related to Execution Timeout, this means your request is taking more than 110 seconds to complete, perhaps explain why you get results in Visual Studio and a possible blank response or no response (as mgebhard mention in his questions to you) on server.

    To set Execution Timeout on web.config https://www.techcartnow.com/increase-timeout-asp-net-application/
    About Execution Timeout https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.httpruntimesection.executiontimeout?view=netframework-4.8

    If all suggestions does not help, then you have another problem and need reformulate your question

    Tuesday, June 23, 2020 7:05 PM
  • User288213138 posted

    Hi dileep Sanker,

    I tried with maxAllowedContentLength  and httpRuntime maxRequestLength setting in Webconfig, but still no luck.

    <configuration>
        <system.webServer>
         <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="500000000"  />
          </requestFiltering>
        </security>  
       </system.webServer>
    </configuration>

    Have you put these settings in your web.config? then republish to iis for testing?

    Best regards,

    Sam

    Wednesday, June 24, 2020 7:38 AM
  • User911209228 posted

    hI Sam,

    I tried , but no luck.

    Thanks & regards,

    DIleep

    Wednesday, June 24, 2020 5:41 PM
  • User288213138 posted

    Hi dileep Sanker,

    EXport Data into EXcel more than 30 mb size not working

    Can you show me how do you export data into excel?

    Best regards,

    Sam

    Thursday, June 25, 2020 7:13 AM
  • User911209228 posted

    hi,

    I have tried all the steps, still no luck.

    Thanks & Regards,

    Dileep

    Friday, July 3, 2020 7:24 AM
  • User288213138 posted

    Hi dileep Sanker,

    please show me how do you export data into excel?

    Best regards,

    sam

    Monday, July 6, 2020 5:30 AM
  • User911209228 posted

    Hi,

    Am using SSRS report data source and converting into bytes.These bytes are used for writing data into excel with the following code,

    Response.OutputStream.Write(bytes,0,bytes.Length);

    Note: Assuming the problem with deployed code in IIS  with load balancing server issue. Able to generate 60 k records with same code and same db with visual studio with  local IIS.But the same code deployed in IIS load balancing server and trying to export the same 60 k records into excel , getting website is hanged and seems error.Also, if I tried  with 30k records with same deployed code with same db, able to export data into excel successfully.Please help me to resolve this issue.

    Tha

    Friday, July 10, 2020 10:56 AM