title: How to fix 'Microsoft Excel cannot open or save any more documents'
body: <p>I am running C# ASP.NET 4.5 web application on Windows 7 64-bit using IIS 7.5. The application pool it uses has the name 'ASP.NET v4.0' and its identity is ApplicationPoolIdentity. The application uses MS Office Interop (Microsoft Excel 14.0 Object Library). </p>
  
  <p>At line <code>wBook = wBooks.Add(Missing.Value);</code>, it throws the following error:</p>
  
  <blockquote>
    <p>Microsoft Excel cannot open or save any more documents because there
    is not enough available memory or disk space. </p>
    
    <p>u2022 To make more memory available, close workbooks or programs you
    no longer need. </p>
    
    <p>u2022 To free disk space, delete files you no longer need from the
    disk you are saving to.:   at
    Microsoft.Office.Interop.Excel.Workbooks.Add(Object Template)</p>
  </blockquote>
  
  <p>1) I gave the account IIS apppool\ASP.NET v4.0 full control on MS Excel Application in DCOM Config.</p>
  
  <p>2) I gave IIS apppool\ASP.NET v4.0 full control on 'C:\Windows\SysWOW64\config\systemprofile' and created a Desktop folder in it.</p>
  
  <p>3) I need to continue using Interop though it's not recommended.</p>
  
  <p>4) The application works fine on Windows Server 2003/Windows XP 32-bit.</p>
  
  <p>5) MS Office 2010 (64-bit, trial version) is installed on the machine.</p>
  
  <p>6) I would prefer not to change the app. pool identity from ApplicationPoolIdentity to Network Service etc..  ApplicationPoolIdentity is the new type of Identity in IIS 7 and it's recommended.</p>
  
  <p>It works fine if I select 'Interactive User' (I have logged in as an admin) in DCOM Config, but it causes other problems. I need to use 'Launching User' which is ASP.NET v4.0. So it looks like it's a permission issue.</p>
  
  <p>Please help. 
  Thank you.</p>