EPPLus Error when loading a Stream larger than 40MB

0

I am using EPPlus on C# MVC to load excel files into memory. I am taking the stream from a file upload:

model.File.InputStream

and pass this to the ExcelPackage.Load() Method.

It works great for files < 40 MB. But for larger files, I get the error:

An exception of type 'System.Runtime.InteropServices.COMException' occurred in EPPlus.dll but was not handled in user code

Additional information: A disk error occurred during a write operation. (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT))

enter image description here

c#
asp.net-mvc
excel
epplus
epplus-4
asked on Stack Overflow Feb 14, 2017 by Cătălin Rădoi • edited Jun 20, 2020 by Community

1 Answer

1

Switching the project to x64 fixed the issue!

  • If you're using this on IIS you have to set the pool to run on x64.
  • On IIS Express you have to Enable x64 bit version
answered on Stack Overflow Feb 14, 2017 by Cătălin Rădoi

User contributions licensed under CC BY-SA 3.0