Excel COM自动停止工作,当用户注销 [英] Excel COM automation stops working when user logs off
问题描述
我开发了一个使用Excel 2007 COM自动化来转换一些xls文件的服务器应用程序。它作为一个服务在Windows数据中心实例上运行,运行在其自己的用户下,我不得不更改DCOM安全设置(作为交互式用户启动)使其正常工作。
I have developed a server app that uses Excel 2007 COM automation to convert some xls files. It is started as a service on a Windows Datacenter instance, running under its own user, and I had to change DCOM security settings ("launch as interactive user") to make it work.
问题是,当我注销(通过RDP),它停止工作。我登录,它再次工作。
The problem is, when I log off (via RDP), it stops working. I log on, it works again.
有没有人有同样的问题?我很高兴在这一点上有任何帮助。
Has anyone had the same problem? I'm glad about any help at this point.
推荐答案
好的,所以我无法让Excel在没有互动的情况下运行用户,没有数量的DCOMCNFG骗子会做。所以我只是为服务运行的用户配置自动登录(请参阅 http://support.microsoft.com/ kb / 315231 的说明)。
Ok, so I couldn't get Excel to operate without an interactive user, no amount of DCOMCNFG trickery would do. So I simply configured autologin for the user the service is running under (see http://support.microsoft.com/kb/315231 for instructions).
这样做的效果是,在服务器启动时,该用户将作为交互式控制台会话登录。与RDP会话不同,这是永久性的,并使Excel快乐。
This has the effect that on server bootup, that user will login as an interactive console session. Unlike RDP sessions, this is permanent and makes Excel happy.
其他提示为pok的灵魂谁必须做类似的事情:
Other hints for the poors souls who have to do something similar:
- 创建文件夹C:\Windows\System32 [或SysWOW64] \config\systemprofile\Desktop
- 确保一个
- 更改DCMCNFG设置(mmc -32,添加组件服务)以运行使用交互式帐户 $ b的用户默认打印机配置$ b
- 更改全局DCOM默认值,允许本地访问,本地启动和本地激活该服务运行在
- create the folder C:\Windows\System32[or SysWOW64]\config\systemprofile\Desktop
- make sure a default printer is configured for the user the service runs under
- change DCOMCNFG settings (mmc -32, add "component services") of Excel to run using the interactive account
- change global DCOM defaults to allow local access, local launch and local activation for the user the service runs under
运气!
这篇关于Excel COM自动停止工作,当用户注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!