当用户注销时,通过交互式用户的 Excel COM 自动化将停止工作
我开发了一个服务器应用程序,它使用 Excel 2007 COM 自动化来转换一些 xls 文件。它作为 Windows 数据中心实例上的服务启动,在其自己的用户下运行,我必须更改 DCOM 安全设置(“作为交互式用户启动”)才能使其工作。
问题是,当我注销(通过 RDP)时,它停止工作。我登录,它又可以工作了。
有人遇到过同样的问题吗?
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.
The problem is, when I log off (via RDP), it stops working. I log on, it works again.
Has anyone had the same problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
好吧,如果没有交互式用户,我就无法让 Excel 运行,再多的 DCOMCNFG 欺骗也无济于事。因此,我只是为运行服务的用户配置了自动登录(请参阅 http://support.microsoft.com /kb/315231 获取说明)。
这会导致在服务器启动时,该用户将作为交互式控制台会话登录。与 RDP 会话不同,这是永久性的,并且让 Excel 满意。
对于必须执行类似操作的可怜灵魂的其他提示:
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).
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.
Other hints for the poors souls who have to do something similar:
服务器端:
A) 将“交互用户”切换为“此用户”。
B) “此用户”仅在创建这些文件夹后才起作用:
C) 等待。 .. 步骤 B) 触发 Windows 自动创建:
请注意,“交互式用户”的定义是搭载服务器的活动登录用户。因此,当服务器上没有活动用户时,无法启动 MS Office。
也就是说,对我来说,该解决方案是已经提出的解决方案的混合体。我在 Win 2012R2 上使用 Office 2013 (x86)。我的问题是使用 Word(使用 WordToPDF)。
步骤 B 的详细信息:
步骤 C 的详细信息:
Server side:
A) Switch "Interactive User" to "This User".
B) "This User" only works after creating these folders :
C) Wait for it... Step B) triggers Windows to auto create:
Note the definition of "Interactive User" is to piggybacked on whatever is the active logged in user to the server. Thus failure to launch MS Office when no user is active on the server.
I.e., for me, the solution was a hybrid of the already proposed solutions. I used Office 2013 (x86) on Win 2012R2. My issue was instead with Word (to use WordToPDF).
Details for Step B:
Details for Step C:
我遇到了这个问题,我发现答案实际上在
DCOM 配置中。
我执行了以下操作来解决该问题:
Identity
code> 选项卡此用户
您可能需要转到
安全
选项卡并确保您在上面指定的用户具有适当的权限权限。完成此操作后,我能够注销服务器,同时仍然使用 Excel COM 自动化库。
I've had this issue, and I found that the answer is actually in the
DCOM Configuration.
I did the following to resolve the issue:
Identity
tabThis User
You may need to go to the
Security
tab and ensure the user you've specified above has appropriate Permissions.After doing this, I was able to Log Off the Server while still using the Excel COM Automation libraries.
有一个叫做 Excel Services 应该可以使用 SharePoint 将 Excel 作为服务运行,这将允许它在无人登录的情况下无人值守地运行。
There's a thing called Excel Services which is supposed to make it possible to run Excel as a service using SharePoint, which would allow it to run unattended with nobody logged in.
如果运行 EXCEL 的帐户是管理员,则这将起作用:
对于 64 位 (x64),创建此文件夹:C:\Windows\SysWOW64\config\systemprofile\Desktop
对于 32 位 (x86),创建此文件夹:C:\Windows\System32\config\systemprofile\Desktop
否则要解决此问题,请按照下列步骤操作:
“启动和激活权限”并向其添加帐户(EXCEL 正在其下运行),并为其授予“本地启动”和“本地激活”权限
“访问权限”并添加ACCOUNT(在其下运行EXCEL)并赋予其“本地访问”权限
If the account which is running EXCEL is administrator then this will work:
For 64-bit (x64), create this folder: C:\Windows\SysWOW64\config\systemprofile\Desktop
For 32-bit (x86), create this folder: C:\Windows\System32\config\systemprofile\Desktop
Otherwise To resolve this issue follow these steps:
" Launch and Activation Permissions" and add ACCOUNT (under which EXCEL is running) to it and give it "Local launch" and "Local Activation" permission
" Access Permissions " and add ACCOUNT (under which EXCEL is running) to it and give it "Local Access" permission
这解决了我的问题。 Windows 10 安全更新已应用于服务器,这是问题首次发生的时间。更改交互式用户设置后,一切又恢复正常。
this fixed my issue. Windows 10 security uodates were applied to the server which is when the issue first started happening. After changing the interactive user setting everything worked as usual once again.