Upgraded to 4.04 from 3.1.1 and Excel file no longer works

Dec 9, 2015 at 11:03 AM
I have an asp.net website which outputs an Excel file via the 3.1.1 EPPLUS.
//Create Excel output.
                Response.Clear();
                Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                Response.AddHeader("content-disposition", "attachment;  filename=Report " +
                                   DateTime.Today.Day.ToString() + "-" + DateTime.Today.Month.ToString() + "-" +
                                   DateTime.Today.Year.ToString() + " " + DateTime.Now.Hour + "-" +
                                   DateTime.Now.Minute + "-" + DateTime.Now.Second + ".xlsx");
                package.SaveAs(Response.OutputStream);
                Response.End();
This works just fine in 3.1.1 but when I have updated to latest 4.0.4 release I get this exception: {"The cachesource is not a worksheet"} and the Excel fiel is corrupted.

Has the saving of the file changed since 3.1.1? If yes then how do I save with 4.0.4?
Dec 16, 2015 at 9:53 AM
This is how i am doing it:
//Create Excel output.
                Response.Clear();
                Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                Response.AddHeader("content-disposition", "attachment;  filename=Report " +
                                   DateTime.Today.Day.ToString() + "-" + DateTime.Today.Month.ToString() + "-" +
                                   DateTime.Today.Year.ToString() + " " + DateTime.Now.Hour + "-" +
                                   DateTime.Now.Minute + "-" + DateTime.Now.Second + ".xlsx");
                Response.BinaryWrite(package.GetAsByteArray())
                //package.SaveAs(Response.OutputStream);
                Response.End();
Giannis