I have a web project (.NET 4) that needs to access an Excel file, but it displays the following error message:
Error occurred 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 is there) • The file is being used by another program. (It can not happen) • The workbook you are trying to save has the same name as a currently open workbook.
In IIS7, I use DefaultAppPool with the identifier "myservice", which is under the administrators group.
On the authentication page of my website in IIS, anonymous authentication was enabled and set to "Application Pool Identifier", and ASP.NET impersonation was disabled.
After finding a solution for several hours, I found the following, but none of them work
- Create a folder in the folder C: \ Windows \ SysWOW64 \ config \ systemprofile \ Desktop. Please contact: this
- Grant "myservice" permissions on component services. Please contact: this
Strange, nothing is in the IIS_IUSRS group. This is normal? I remember at least two users (DefaultAppPool and Classic.NET AppPool).
I assume this is an IIS resolution issue, but I cannot solve it.
source share