Support Center

IsolatedStorageException when writing a large XSLX files

XLSX files are zipped, XML-based, file formats and when working with these files GemBox.Spreadsheet uses System.IO.Packaging namespace for extracting (loading) and archiving (saving) its content.

System.IO.Packaging stores a data in RAM memory, but if a file is bigger than 10MB then it will begin to use IsolatedStorage using a user/domain store as a scratch pad area. To access IsolatedStorage your code must have all the necessary native platform operating system rights and if it doesn’t it will fail to create an IsolatedStorage stream.
Read more on MSDN Isolated Storage.

For example this can occur when a GemBox.Spreadsheet's code is started by a COM infrastructure. When COM creates the AppDomain instance it doesn’t provide any evidence and thus creating an AppDomain with no identity.
Also this or a variation of this issue may occur when running under IIS when an account does not have a permission to use IsolatedStorage.

Unfortunately System.IO.Packaging behaviour cannot be changed, but here are few workarounds you can try in order to avoid this issue:

  • For COM related issue you can execute a code which requires a IsolatedStorage in a new AppDomain with the necessary credentials and evidence.
  • For server related issue you can create new folder on server ("C:\Documents and Settings\Default User\Local Settings\Application Data\IsolatedStorage") and then you have to give the Server User Account which IIS uses rights to use that folder.
    The following is a step by step guide how to set up an IsolatedStorage on production server.

    First find that account:
    1. Go to Administrative Tools and click on Internet Information Services (IIS) Manager.
    2. Expand (local computer) and then expand Web Sites.
    3. Right click on your web site and choose Properties.
    4. Click on the Directory Security tab.
    5. In the Authentication and access control panel click on Edit.
    6. In the window that opens Enable anonymous access must be checked.
      • The username listed is the User account is the one you want.
      • Write it down for later use.
    7. Close the IIS Manager.

    Now give this account and the IIS_WPG user account permission to use the IsolatedStorage folder using the following steps:
    1. Open Windows explorer and navigate to "C:\Documents and Settings\Default User\Local Settings\Application Data\".
    2. Right click on the IsolatedStorage folder and click on Sharing and Security.
    3. Click on the Security tab.
    4. Click on Add and add the User account name you found in the steps above if it does not exist.
      • If you had to add the user, Click on Check Names to make sure the name is recognized.
    5. Then add a user called IIS_WPG if it does not exist.
      • If you had to add the user, Click on Check Names to make sure the name is recognized.
    6. Then click on OK and that window will close.
    7. Give both of these new User names 'Modify', 'Read & Execute', 'List Folder Contents', 'Read', and 'Write' permissions.
    8. Click on Apply.
    9. Close everything and logoff the server.
3 of 3 people found this page helpful
Subscribe to this article to get an email notification when it is updated.


  • Hi Gembox,

    We are intermittently having this "storage must be open" issue and we want to try out this solution on our DEV environment. But we cannot seem to find the path "C:\Documents and Settings\...". Our server is Windows Server 2008 R2. Any suggestions?
  • Thanks Mario, I will try the path you mentioned tomorrow.
    For the alternatives, it seems its a registry edit so I will only try that as the last option.