我试图从编辑VB.NET使用大部分的代码Word文档:检索COM类工厂组件的错误而产生的word文档
如何从Visual Basic .NET使Word自动运行创建一个新的文件 http://support.microsoft.com/kb/316383
它在我的机器上正常工作,但当我发布到服务器时,我得到以下错误。
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
实际的错误,当我尝试只创建一个Word应用程序对象
Dim oWord As New Word.Application
使用Visual Studio 2008和VB.NET 3.5发生。我参考了“Microsoft Word 10.0 Object Library”,并在bin目录中看到了Interop.Word.dll文件。
开发计算机和Windows Server 2003
还是相当新的.NET和没有关于窗口服务器多少知识,而是出现“UnauthorizedAccessException”关于使用MS Office 2003的听起来像一个权限问题。我想知道如果有人能指出我正确的方向,我可能需要做的是让我的小应用程序访问使用word。
有趣的是,当我登录到系统并运行Word时,它运行安装程序。我猜这个用户之前没有人跑过这个词。它并没有解决我的问题,但我甚至怀疑即使没有许可问题,如果这将阻止它的工作。 没有我的代码是一个Web应用程序。虽然这是一个很少使用的小应用程序,但我从来没有考虑过如果两个人同时尝试运行它,会发生什么情况。感谢那些意见。 有没有办法查看其他人是否正在访问COM对象?我很确定没有别的,但我甚至不知道在哪里检查。 – TheDPQ 2009-07-27 21:42:53
Web应用程序以用户身份运行?例如,在IIS 7中,应用程序池将作为本地系统运行,这可能会有相同的问题。 – 2009-07-27 22:14:00