Last post Oct 27, 2017 11:50 AM by jzero
Oct 27, 2017 11:02 AM|Nazeer Ahmed|LINK
When we are trying to export Excel report from my ASP.Net application sometimes its working sometime it showing above error. Need any suggestions please.
if we are facing this isssu IIS restart is helping at the moment but again same issue after some time.
Oct 27, 2017 11:12 AM|PatriceSc|LINK
You need to check your code for memory consumption and anything that could be kept alive longer than needed. Check also the size of your data in case you really try to export a huge Excel file.
Which VS edition are you using? I believe even Community 2017 include now memory diagnostics tools.
BTW you don't have the place where it happens? The error should include at least the "stacktrace" which allow to know the method in which it fails.
Oct 27, 2017 11:50 AM|jzero|LINK
In addition to PatriceSc, if using VS 2015 or 2017, debug and take some Snapshots of Memory Usage with it you can identify what is consuming memory and perhaps not released by GC.
Sometimes, OutOfMemory happens not because there is no memory available but due to non contiguous space in memory.
This article explain better: https://blogs.msdn.microsoft.com/webtopics/2009/05/22/troubleshooting-system-outofmemoryexceptions-in-asp-net/