Epplus download stream causes disk write error

I am downloading an excel file and trying to load it in ExcelPackage. Like this

public static void ImportStuff(Stream stream)
{
   using (ExcelPackage package = new ExcelPackage())
   {
     package.Load(stream);
     ...

      

My call method gets a stream from an uploaded file

public  async Task<ActionResult> UploadCsv(int Id, HttpPostedFileBase myfile)
{
    ImportProducts(myfile.InputStream);
}

      

This will result in A-disc error during the write operation. (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT))

Why is there a write error when I try to upload something?

+3


source to share


1 answer


I tried to download a csv file. Not xslx file. We could have hoped for a more detailed error message, but it works.



+2


source







All Articles