I'm developing a ASP.NET 2.0 Project using C#. In my project I create a powerpoint file which has been initialize dynamically. In my code behind creates and imports powerpoint files using
- I added Microsoft Office 12.0 Object Library from COM tab. (In my solution it seems Microsoft.Office.Core)
- and Microsoft.Office.Interop.PowerPoint from NET tab.
But there is an inconsequence status in here. When I run this module I can download a presentation. But after a while when I 'm importing an powerpoint file I get this error :
Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80080005.
And all of my powerpoint modules starts givinig this error.
This is very importand for me.
Thanks for your advice.
c#OfficeCOM classpowerpoint80080005
Ertürk Erdağı
Software And Interface Developer
www.erturkerdagi.com
Make sure that the COM components are installed/registered on any machine you are using this from (Yes office has to be installed on the server as well).
Also the accounts (NETWORK SERVICE & ASP.NET) need the proper permissions to use the COM objects. You will need to use the DCOM config tool to do this. A quick search on Google will give you the info on how to do this.
If the problem is intermittent you are pretty much on your own as Microsoft does not support nor even suggest you use Office Automation in server based applications (for this and other reasons).
Good luck
Please mark the most helpful post(s) as Answer Blog | I need more space:DropBox Referral
But I gived permissions to ASPNET and NETWORK SERVICE. And the errors still continue then I gived permissions to EveryOne. This point didn't solve problem. If I don't use import module my download module works successfully. But when I'm using import module,
all of my powerpoint modules start giving the errors.
Is there a suggestion ?
Thanks ...
Ertürk Erdağı
Software And Interface Developer
www.erturkerdagi.com
After you use your import module check out your system processes in Task Manager and make sure that the process powerpnt.exe is not listed. Realistically once your code is done it should kill this process. I know that Excel is the worst for this and have
seen dozens of EXCEL.EXE processes sitting idle on servers because the code calling them does not actually shut them down properly.
Other than that try adding the ASPNET and NETWORK SERVICE accounts to the Administrators Group and run your code.
However do not leave it like this as it's a huge security issue, you just want to try this just to make sure that it is not a permission issue.
Please mark the most helpful post(s) as Answer Blog | I need more space:DropBox Referral
This code will have to be called even if there is an error so you probably should have a try ... catch ... finally block. The finally block should first check to see if the objects are null (Nothing in VB) before trying to call the close and quit.
Also you might want to make a call to the ReleaseComObject() method on each object and then do a Garbage collect so
Error occurs mostly when you initilize or open an COM object for reading/writing. This becoz of application Launch and Activation permission. Refer this blog, its about excel, apply same permissions for PP.
erturkerdagi
Member
2 Points
5 Posts
COM Class 80080005 Error
Oct 03, 2009 02:46 PM|LINK
Hi,
I'm developing a ASP.NET 2.0 Project using C#. In my project I create a powerpoint file which has been initialize dynamically. In my code behind creates and imports powerpoint files using
Microsoft.Office.Interop.PowerPoint.ApplicationClass
Microsoft.Office.Interop.PowerPoint.Presentation
In project reference
- I added Microsoft Office 12.0 Object Library from COM tab. (In my solution it seems Microsoft.Office.Core)
- and Microsoft.Office.Interop.PowerPoint from NET tab.
But there is an inconsequence status in here. When I run this module I can download a presentation. But after a while when I 'm importing an powerpoint file I get this error :
Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80080005.
And all of my powerpoint modules starts givinig this error.
This is very importand for me.
Thanks for your advice.
c# Office COM class powerpoint 80080005
Software And Interface Developer
www.erturkerdagi.com
whighfield
Star
11721 Points
1859 Posts
Re: COM Class 80080005 Error
Oct 03, 2009 03:44 PM|LINK
Make sure that the COM components are installed/registered on any machine you are using this from (Yes office has to be installed on the server as well).
Also the accounts (NETWORK SERVICE & ASP.NET) need the proper permissions to use the COM objects. You will need to use the DCOM config tool to do this. A quick search on Google will give you the info on how to do this.
If the problem is intermittent you are pretty much on your own as Microsoft does not support nor even suggest you use Office Automation in server based applications (for this and other reasons).
Good luck
Blog | I need more space:DropBox Referral
erturkerdagi
Member
2 Points
5 Posts
Re: COM Class 80080005 Error
Oct 04, 2009 10:32 AM|LINK
Thanks for your suggestions.
But I gived permissions to ASPNET and NETWORK SERVICE. And the errors still continue then I gived permissions to EveryOne. This point didn't solve problem. If I don't use import module my download module works successfully. But when I'm using import module, all of my powerpoint modules start giving the errors.
Is there a suggestion ?
Thanks ...
Software And Interface Developer
www.erturkerdagi.com
whighfield
Star
11721 Points
1859 Posts
Re: COM Class 80080005 Error
Oct 04, 2009 06:21 PM|LINK
After you use your import module check out your system processes in Task Manager and make sure that the process powerpnt.exe is not listed. Realistically once your code is done it should kill this process. I know that Excel is the worst for this and have seen dozens of EXCEL.EXE processes sitting idle on servers because the code calling them does not actually shut them down properly.
Other than that try adding the ASPNET and NETWORK SERVICE accounts to the Administrators Group and run your code. However do not leave it like this as it's a huge security issue, you just want to try this just to make sure that it is not a permission issue.
Blog | I need more space:DropBox Referral
erturkerdagi
Member
2 Points
5 Posts
Re: COM Class 80080005 Error
Oct 04, 2009 07:28 PM|LINK
In my code there is a code block for killing this.
presentation.Close();
presentationApplication.Quit();
But if this occurs how can I handle this error to kill.
Software And Interface Developer
www.erturkerdagi.com
whighfield
Star
11721 Points
1859 Posts
Re: COM Class 80080005 Error
Oct 04, 2009 07:58 PM|LINK
This code will have to be called even if there is an error so you probably should have a try ... catch ... finally block. The finally block should first check to see if the objects are null (Nothing in VB) before trying to call the close and quit.
Also you might want to make a call to the ReleaseComObject() method on each object and then do a Garbage collect so
Blog | I need more space:DropBox Referral
erturkerdagi
Member
2 Points
5 Posts
Re: COM Class 80080005 Error
Oct 04, 2009 08:08 PM|LINK
My code is in a try-catch-finally block. But now I'm adding the code about garbace.
Thanks for your suggesttions.
Software And Interface Developer
www.erturkerdagi.com
suthish nair
All-Star
15176 Points
3304 Posts
Re: COM Class 80080005 Error
Oct 04, 2009 08:45 PM|LINK
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
My Blog