Server2008 R2 中拒绝访问 ProgID: "excel.application"及配置Microsoft Excel Application权限解决方案
来源:互联网 发布:js select选中的值 编辑:程序博客网 时间:2024/06/06 08:25
如果按照
http://blog.csdn.net/kongwei521/article/details/43699503
http://blog.csdn.net/kongwei521/article/details/43698667
两个链接里面都无法解决的话
采用终极办法
C:\Windows\SysWOW64\config\systemprofile\Desktop 64位系统
C:\Windows\System32\config\systemprofile\Desktop 32位系统
目录设置为Everyone和NetWorkSerices 等等 权限即可。
如果没有Desktop 这个文件夹 则自行创建后赋予权限即可。
相关可参考
http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91http://yeppfly.blog.51cto.com/405635/964304
【
Working config: Microsoft Excel Enterprise 2007 + Windows Server 2008 x64 edition + .NET 4.0 web application
Server Error in '/excel' Application.
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
This error is basically saying that the IIS / ASP.NET framework does not have permission under its current user to run/access COM Objects.
Following the instructions here http://www.computerperformance.co.uk/Logon/code/code_80070005.htm Led me to a solution. Using DCOMCNFG you can set COM permissions. However, instead of just setting COM permissions on the 'Microsoft Excel Application', I needed to set permissions for the entire computer. The linked article has you setting permissions for 'Everyone' but that's not necessary. You only need to set permissions for NETWORK SERVICE user.
Originally, I had followed the steps located here: http://blog.crowe.co.nz/archive/2006/03/02/589.aspx ... those steps have you set permissions to NETWORK SERVICE but only on the Excel Application. For some reason, that wasn't enough on my environment, I needed to set it on the entire 'My Computer' and not the individual app.
OK, so I set up permissions, but then I was getting a totally different error, one that didn't jive at all:
“Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space.
• To make more memory available, close workbooks or programs you no longer need.
• To free disk space, delete files you no longer need from the disk you are saving to.”
This is of course false. My machine had plenty of space. So what gives?
This is the hardest part to grok, IMHO. This error will NOT occur in Windows Server 2008 32 bit edition (x86). Why not? Because the Folder Structure is different for a user in x64 edition. Excel, when opened, actually tries to create some temporary files or other data when it loads. If it does not have the ability to write to the disk (either because the disk is actually full, or in our case, because that folder is not something we can write to due to security setup), then the disk error is the default message shuttled back to the user. Here are the write locations
C:\Windows\SysWOW64\config\systemprofile\Desktop (x64, does not exist by default)
C:\Windows\System32\config\systemprofile\Desktop (x86, exists by default and is writeable)
http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91
has more on this issue. Basically, to get this to work, take two steps: Create C:\Windows\SysWOW64\config\systemprofile\Desktop and give C:\Windows\SysWOW64\config\systemprofile folder write access to 'Everyone'. This will allow excel to proceed past this error and hopefully start automating files for you.
Finally, I was getting one last error after doing this step:
Service cannot be started. System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'c:\temp\test.xls'. There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.
This is because the folder I was trying to write to was not allowed full-control rights by NETWORK SERVICE. If you app writes excel files to a directory, that directory must be full-control permissioned to NETWORK SERVICE.
ONE OTHER THING: If you are running an OFFICE TRIAL VERSION and you have not entered a license key, your app might hang and never load anything. This is because the COM Object actually spawns a modal dialog for a license key and your code will wait there for a user who will never come to add a license key. So, be sure if you're automating excel that you ONLY using a registered version and not a 30 day trial or unlicensed version.
】
- Server2008 R2 中拒绝访问 ProgID: "excel.application"及配置Microsoft Excel Application权限解决方案
- 在32及64位系统中拒绝访问 ProgID: "excel.application"及配置Microsoft Excel Application权限解决方案
- 创建Excel.Application对象时报“检查权限时,拒绝对此对象的访问
- 在Windows2008 R2系统中无法看见Microsoft Excel Application的问题解决方案
- 在Windows2008 R2系统中无法看见Microsoft Excel Application的问题解决方案
- Microsoft.Office.Interop.Excel.Application IIS权限问题
- Excel.Application
- 求解Microsoft.Office.Interop.Excel.Application引用
- Excel.Application 导出Excel
- AutomationFactory.CreateObject("Excel.Application")无法为指定的ProgID创建对象实例
- Server.CreateObject("Excel.Application")的权限问题
- Server.CreateObject("Excel.Application")的权限问题
- windows server 2008 x64中安装office2003,dcom中找不到microsoft excel application
- windows server 2008 x64中安装office2003,dcom中找不到microsoft excel application .
- 配置excel远程访问权限
- windows server 2008中读取Microsoft Excel Application COM组件问题的解决方式
- asp调用Word.Application或Excel.Application无权限(无法执行server.createobject("Word.Application"))
- 在Asp.net中建立Microsoft.Office.Interop.Word.Application时出现“拒绝访问”错误的解决方法
- C#发送邮件的方法及实例代码
- aidl is missing
- JAVA多线程编程(三)——线程的生命周期(sleep,join,interrupt)
- JVM学习笔记(一)------基本结构
- MAC命令 和 vi命令
- Server2008 R2 中拒绝访问 ProgID: "excel.application"及配置Microsoft Excel Application权限解决方案
- 九度 1411 -图最短路径 - 转圈
- 合并两个有序数组
- SQLite3中的日期时间函数使用小结
- Map.get()得到数组
- MongoDB用户权限操作
- java中的sleep()和wait()的区别
- JVM学习笔记(二)------Java代码编译和执行的整个过程
- 文章标题