Im upload an excel file and trying to load it into a ExcelPackage. Like this
public static void ImportStuff(Stream stream)
{
using (ExcelPackage package = new ExcelPackage())
{
package.Load(stream);
...
My calling method gets the stream from an uploaded file
public async Task<ActionResult> UploadCsv(int Id, HttpPostedFileBase myfile)
{
ImportProducts(myfile.InputStream);
}
This will cause a A disk error occurred during a write operation. (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT))
Why do a get a write error when I am trying to load something?
I was trying to upload a csv file. Not a xslx file. Could have hoped for a more descriptive error message but it is working.
User contributions licensed under CC BY-SA 3.0