Click here to Skip to main content
13,052,870 members (64,555 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am getting the below mentioned error when my web service tries to open MS word document pragmatically through my .net web service. When I run web service through visual studio, it works fine but when I deploy web service on IIS 7, I get the error

Retrieving the COM class factory for component with CLSID
{000209FF-0000-0000C000-000000000046} failed due to the following error: 80070005
Access is Denied

Im using 64-Bit system and Office 2007. Can any 1 help me to fix out the problem.
Posted 26-Sep-12 3:43am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Saranya811 27-Sep-12 2:05am
Thank you for the reply.
My requirement I have a word document template which is present in the server. I have to open the template find and replace some value and save as the word document with different name.All these process have to be made only in the server. After save as the newly saved document has to be opened to client. Im using " Microsoft.Office.Interop.Word.Application oWordApp = new Microsoft.Office.Interop.Word.Application();" code for word application where I getting error. Is there any way to achieve my result.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2[^]

1.In the line of command put DCOMCNFG
2.Click Right on Console Root > Component Service > Computers > My Computer, And Select Properties
3.In the Tab COM Security > Launch and Activation Permissions Click in Edit Default
4.Add the User (Ex. IIS_IUSRS) or service
5.Check Allow Local Launch and Local Activation
aksrup 7-May-13 7:18am
I tried above steps still getting same error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 30 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100