Server的Word自动化权限(一些答案和一些问题) [英] Server Word automation permissions (some answers and some questions)
问题描述
我试图用字自动化计算在Word文档中的页数。
到目前为止,我已经面临这些错误:
I am attempting to use word automation to count the number of pages in a word document. So far i have faced these errors:
-
检索COM类工厂具有CLSID组件{000209FF-0000-0000-C000-000000000046}失败,原因是以下错误:80070005
在打开的Word文档时卡住了。
Word stuck when opening a document.
我在此刻和步骤,我把到目前为止的分辨率是:
My resolution at the moment and steps i took so far are:
-
更改注册表项
[HKEY_CLASSES_ROOT \\的AppID \\ WINWORD.EXE]
从{A86A40B3-0008-4D41-975C-BB586C7121E3}
到{00020906-0000-0000-C000-000000000046}
。
在DCOM配置 DCOMCNFG.EXE
做了以下修改:
In DCOM config DCOMCNFG.EXE
made the following changes:
-
在微软Word应用程序下的APPID显示{A86A40B3-0008-4D41-975C-BB586C7121E3}给用户
IUSR_<&MACHINE_NAME GT;
当地午餐权限(只),并设置身份启动用户。
In "Microsoft Word Application" displayed under its appID "{A86A40B3-0008-4D41-975C-BB586C7121E3}" gave user
iusr_<MACHINE_NAME>
local lunch permissions (only) and set identity to "The launching user".
在Microsoft Office Word中97 - 2003文档也被一些被称为Microsoft Word文档(可能取决于word版)我给予了充分的启动和访问权限都IUSR和IWAM,设置身份验证级别无,设置用户推出我自己的管理员用户。
In "Microsoft Office Word 97 - 2003 Document" also known by some as "Microsoft Word Document" (probably depends on word version) i gave full launch and access permission to both iusr and iwam, set Authentication level to "None", set launching user to my own admin user.
在节2-B的所有3 MODS的结合,终于使这一切的磨难工作,现在运作。
用我自己的用户发动之际,针对Word中打开文档时被卡住。
设置身份验证恢复为默认的错误1的结果。
设置启动用户返回到错误的2,启动用户的结果。
The combination of all 3 mods in section "2-b" finally made all this ordeal work and is now functioning. Using my own user for launching came as response to word getting stuck when opening a document. Setting authentication back to default results in error "1". Setting launching user back to "The launching user" results in error "2".
目前的情况是,所有的工作,但只有当我的用户登录和积极的机器上我没有的事实,我必须用我自己的用户是具有兴奋进行登录和身份验证设置为无。
The current situation is that all is working but only when my user is logged on and active on the machine and i am not thrilled by the fact that i have to use my own user that is has to be logged on and that authentication is set to none.
我写这为那些挣扎我好几天得到这个工作的答案,并希望得到一些答案,我会如何对安全性的提高,又名删除启动用户,并设置回身份验证,并且不会登录24/7 以生产机(当网站启动)。
I am writing this as an answer for those struggling as me for days to get this working and hopefully to get some answers to how i might improve on security, aka remove launching user and set back authentication, and not be logged on 24/7 to the production machine (when the site launches).
开发机规格:结果
的Windows XP专业版32位结果
IIS 5.1结果
经典ASP网站搜索
COM + C#对象执行自动化。
Specification of development machine:
Windows XP Pro 32bit
IIS 5.1
Classic ASP Website
COM+ C# object doing the automation.
推荐答案
,以避免用户A登录解决方案是24/7来模拟帐户和编程方式加载用户配置文件(该帐户需要本地管理员)之前调用Word中。
A solution to avoid having the user logged 24/7 is to impersonate the account and load the user profile programmatically (for this the account needs to a local administrator) before calling Word.
另一种解决方案是建立一个Windows服务,做同样的。
Another solution is to build a windows service that does the same.
这篇关于Server的Word自动化权限(一些答案和一些问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!