问题描述
我正在使用 IIS 7.5 在 Windows 7 64 位上运行 C# ASP.NET 4.5 Web 应用程序.它使用的应用程序池名为ASP.NET v4.0",其标识为 ApplicationPoolIdentity.该应用程序使用 MS Office Interop(Microsoft Excel 14.0 对象库).
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).
在 wBook = wBooks.Add(Missing.Value);
行,它抛出以下错误:
At line wBook = wBooks.Add(Missing.Value);
, it throws the following error:
Microsoft Excel 无法打开或保存更多文档,因为没有足够的可用内存或磁盘空间.
u2022 要获得更多可用内存,请关闭您的工作簿或程序不再需要.
u2022 To make more memory available, close workbooks or programs you no longer need.
u2022 要释放磁盘空间,请从您要保存到的磁盘.: 在Microsoft.Office.Interop.Excel.Workbooks.Add(对象模板)
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)
1) 我在 DCOM 配置中给了帐户 IIS apppoolASP.NET v4.0 对 MS Excel 应用程序的完全控制权.
1) I gave the account IIS apppoolASP.NET v4.0 full control on MS Excel Application in DCOM Config.
2) 我赋予 IIS apppoolASP.NET v4.0 对C:WindowsSysWOW64configsystemprofile"的完全控制权,并在其中创建了一个桌面文件夹.
2) I gave IIS apppoolASP.NET v4.0 full control on 'C:WindowsSysWOW64configsystemprofile' and created a Desktop folder in it.
3) 虽然不推荐使用 Interop,但我需要继续使用它.
3) I need to continue using Interop though it's not recommended.
4) 该应用程序在 Windows Server 2003/Windows XP 32 位上运行良好.
4) The application works fine on Windows Server 2003/Windows XP 32-bit.
5) 机器上安装了 MS Office 2010(64 位,试用版).
5) MS Office 2010 (64-bit, trial version) is installed on the machine.
6) 我不想更改应用程序.从 ApplicationPoolIdentity 到 Network Service 等池标识.ApplicationPoolIdentity 是 IIS 7 中的新型标识,推荐使用.
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.
如果我在 DCOM Config 中选择交互式用户"(我以管理员身份登录),它工作正常,但会导致其他问题.我需要使用 ASP.NET v4.0 的启动用户".所以看起来这是一个权限问题.
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.
请帮忙.谢谢.
推荐答案
用文件资源管理器右键单击文件,选择 Properties
,然后选择 General
选项卡并单击解锁
按钮.此错误消息非常具有误导性.
Right click on the file with file explorer, choose Properties
, then General
tab and click on the Unblock
button. This error message is very misleading.
这篇关于如何修复“Microsoft Excel 无法打开或保存更多文档"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!