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

Community
  • 1
  • 1
Cătălin Rădoi
  • 1,804
  • 23
  • 43

1 Answers1

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
Cătălin Rădoi
  • 1,804
  • 23
  • 43