2013-07-30 39 views
0

我想從我的MVC 2應用程序的Windows 2008服務器64位上的應用程序使用Word文檔。我遇到了這個錯誤信息:Word文檔錯誤

System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic).

我試過所有已知的解決方案,但仍無法解決它。

+0

我如何知道應用程序池用戶..? – user2615257

+0

http://www.iis.net/learn/manage/configuring-security/application-pool-identities – sky

回答

1

First of all, please note that serverside office interop isn't officially supported by Microsoft: http://support.microsoft.com/kb/257757

不過我有帶電源點運行類似的情景,不得不做以下步驟來擺脫錯誤的你描述:

  1. 運行Microsoft管理控制檯(MMC.EXE)
  2. 爲「組件服務」添加管理單元
  3. 搜索計算機\我的電腦\ DCOM配置\ Microsoft Office Power Point幻燈片 \(您可能會搜索某些聽起來正確的文字場景)
  4. 打開屬性>選項卡「安全」
  5. 「啓動和激活權限」>編輯...
  6. 您的應用程序池的用戶添加到這個列表,並允許「本地啓動」和「本地激活」