Excel cannot access the file with IIS7&Windows Serer 2008 R2(64bit)
- by user838204
I have a web project(.Net4) that needs to access Excel file, but it ends up with the following error message:
Error occured during file generation.Microsoft Excel cannot access the file 'D:\xx\xx\abc.xls'.
There are several possible reasons:
• The file name or path does not exist. (Actually it's there)
• The file is being used by another program.(It cant happen)
• The workbook you are trying to save has the same name as a currently open workbook.
In IIS7, I use DefaultAppPool with the Identity "myservice" who's under the Group of Administrators.
In the Authentication Page of my website under IIS, Anonymous Authentication was enabled and set to "Application pool identity" and ASP.NET Impersonation was disabled.
After searching the solution for hours, I found the following but NONE of them work
Create folder in C:\Windows\SysWOW64\config\systemprofile\Desktop. Plz refer:this
Grant rights of "myservice" in Component Services. Plz refer:this
One thing strange, there is nothing in the Group of IIS_IUSRS. Is that normal? Cause I remember at least two users (DefaultAppPool & Classic .Net AppPool).
Plz tell me how to fix the access problem. I assume that's permission problem of IIS but I cant solve it.
Thank you.