0
我在C#中使用Microsoft.Office.Interop.Word.dll的組件。但是當我在IIS上運行它時,出現以下錯誤。C#中的Word組件
Retrieving the COM class factory for component with
CLSID {000209FF-0000-0000-C000-000000000046} failed
due to the following error: 80070005.
如果我在IIS上允許32位應用程序,我收到以下錯誤。
」Validation of viewstate MAC failed. If this application is
hosted by a Web Farm or cluster,
ensure that <machineKey> configuration specifies the
same validationKey and validation algorithm.
AutoGenerate cannot be used in a cluster」
我在web.config文件中輸入以下行。
<system.windows.forms jitDebugging="true"/>
如果我再次運行,這是給我的錯誤。
Microsoft Word encountered a problem.
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.Runtime.InteropServices.COMException:
Word encountered a problem.
Source Error:
Line 711:
Line 712: //ADDING A NEW DOCUMENT TO THE APPLICATION
Line 713: oWordDoc = oWord.Documents.Add(ref yol, ref oMissing,
ref oFalse, ref oTrue);
Line 714:
Line 715: // SELECT END
順便說一句,我使用IIS 7的Windows服務器上的64位2008年
我怎樣才能解決這個問題?
在此先感謝。
有什麼建議嗎? – Arbelac 2011-04-18 20:46:23
在服務器上安裝了Word/Office嗎? – Kev 2011-04-18 20:50:52
@ Kev- yes.it已安裝。 – Arbelac 2011-04-18 20:53:30