This project has moved. For the latest updates, please go here.

IsolatedStorageException: Unable to create the store directory.

Apr 28, 2011 at 11:46 AM


I am using EPPLus to generate an Excel file that represent a lot of information that comes from a datagrid.
If the file become too big I got the YSOD with this message:


Server Error in '/' Application.

Unable to create the store directory. (Exception from HRESULT: 0x80131468)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468)]
   OfficeOpenXml.ExcelPackage.Save() +586
   OfficeOpenXml.ExcelPackage.SaveAs(Stream OutputStream) +49
   Fast.DexiaWebService.Historical.OnClickbtnExport(Object sender, EventArgs e) in file.cs:558
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

the method I use is :


I try the excelFile.GetAsByteArray() method but I have the same issue.

Can someone help me?


Apr 28, 2011 at 8:12 PM


I think you are having the same problem that I had when I was using EPPlus on a Script Task in SSIS.

You can read the blog post that I wrote about the issue (and the solution to it): On the article, there is the code snippet that was the one that solved my problem.

Hope this helps.

If you have any questions about the article, don't hesitate to ask me.

Aug 24, 2011 at 1:29 PM

If you're running your application pool as "Network Service" granting at least Modify permissions for the Network Service account to "C:\Documents and Settings\Default User\Local Settings\Application Data\IsolatedStorage" will get you going.

I had to create the IsolatedStorage directory on our server as it didn't exist.

Credit goes to Brent Keller :