【发布时间】:2012-06-21 02:38:19
【问题描述】:
我有一个需要访问 Excel 文件的 Web 项目 (.NET 4),但最终出现以下错误消息:
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.
在 IIS7 中,我使用 DefaultAppPool 和管理员组下的身份“myservice”。
在我的网站在IIS下的身份验证页面中,启用了匿名身份验证并设置为“应用程序池身份”,并禁用了ASP.NET模拟。
在搜索了几个小时的解决方案后,我发现了以下但没有一个工作
奇怪的是,IIS_IUSRS 组中没有任何内容。这正常吗?我记得至少有两个用户(DefaultAppPool 和 Classic .NET AppPool)。
我认为这是IIS的权限问题,但我无法解决。
【问题讨论】:
-
命名目录是否存在?管理员组是否对该目录具有读、写、创建等权限?
-
你没有提到安装的Excel的版本和位数。
标签: excel iis-7 permissions windows-server-2008 identity