System.UnauthorizedAccessException: Retrieving the COM class factory for Word Interop fails with error 80070005

后端 未结 10 1208
无人及你
无人及你 2020-11-27 16:01

I have a problem with a C# ASP .NET project in Visual Studio 2008 This problem started when I reinstalled my computer with Windows 7 Ultimate (x64). To this I\'m also using

10条回答
  •  半阙折子戏
    2020-11-27 16:53

    Here is my fix for this problem:

    I'm using Win 7 64bit and Office 2007

    Run program "dcomcnfg -32". ( You cant find the word and excel components if it runs under 64bit)

    Go to "Console Root/Component Services/Computer/My Computer/DCOM Config/" Look up Microsoft Word and Excel and choose properties.

    Go to Security and select "Customize" under "Configuration Permissions. (If needed you might want to change the other permissions as well, but I didn't need to) Add "IIS_IUSRS" and give it "Full Control".

    Now go to "Identity" and select "The interactive user".

    Do not forget to press "OK" when done. :D

    I Hope this helps you with your problem and also the rest who gets here and read this.

提交回复
热议问题