Wednesday, May 2, 2012

ApplicationException: Access is denied when using EPPlus or OfficeOpenXml

I have a basic site setup with reports that can be exported to Excel 2007 .xlsx formatted files. I was running into an issue with one of the larger reports where it would work for a while and then crash with an "ApplicationException: Access is denied" error. Running the same procedure on my test box worked fine though, so I had to scratch my head a little. Luckily Google searching came through again and the fix is very simple. I found it here:

On your web server, create a folder named IsolatedStorage in C:\Documents and Settings\Default User\Local Settings\Application Data\. Then make sure to give the user setup on your ApplicationPool read and write privileges on that folder. If you don't know which user that would be and are running IIS 6, go to your Application Pools in IIS Manager, right-click the pool you want to check and go to Properties. Under the Identity tab you'll find the account name.

No comments: