Click here to Skip to main content
15,886,564 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I am creating power point application using vs2010 c# with asp.net.

I am Using windows server 2008 R2 enterprise edition and Microsoft office professional plus 2007, vs2010.

I tried in XP sp2 with IIS 5.1, Microsoft office professional plus 2007 and vs2010 its working fine.

It was working fine with out using IIS.

If I connect to the IIS I am getting the below error

Error:
Server Error in '/LOUPeProject.WebDummy' Application.

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.PowerPoint.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{91493442-5A91-11CF-8700-00AA0060263B}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).

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.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.PowerPoint.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{91493442-5A91-11CF-8700-00AA0060263B}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
Source Error:
Line 2347: }
Line 2348:
Line 2349: Microsoft.Office.Interop.PowerPoint.Application pptApplication = new Microsoft.Office.Interop.PowerPoint.Application();
Line 2350:
Line 2351: Microsoft.Office.Interop.PowerPoint.Slides slides;

Kindly help me out this issue. What might be the Library not registered.
Posted
Updated 23-Dec-13 15:23pm
v13
Comments
LaxmikantYadav 15-Dec-13 23:58pm    
Invalid reference to some unregistered assembly can cause it.
D-Kishore 16-Dec-13 1:05am    
but its working fine with without iis
Mehdi Gholam 16-Dec-13 1:58am    
Make sure Office is installed on the IIS machine.
D-Kishore 16-Dec-13 2:15am    
yes vs2010,iis and office all 3 installed on the same machine
Aravindba 19-Dec-13 22:30pm    
hai r u trying to run power point form web ? if any exe u trying run form iis ,u need permission.

You should check whether PowerPoint is installed in the IIS system or not. If installed, you can do the operations, else you can't.

Follow my Tip - How to Check Whether PowerPoint is Installed in the System or Not[^] for that.
 
Share this answer
 
Comments
D-Kishore 16-Dec-13 2:16am    
Yes its installed.
Try the solutions given in below links.

1. C#: PPT to PDF-Unable to Cast COM Object of Type 'Microsoft.Office.Interop.PowerPoint. ApplicationClass' to Interface Type 'Microsoft.Office.Interop.PowerPoint. _Application[^]


2. Unable to cast COM object of type 'Microsoft.Office.Interop.[^]

Hi,

Imtiyaz Ansari, i got solutoin for this problem.

I just delete the Key from the Registry Editor and it's working now.

The Procedure is:

Start--> Run --> regedit

&

HKEY_CLASSES_ROOT-->TypeLib-->{00020813-0000-0000-C000-000000000046}
--> 1.8(Delete one)
I Delete that 1.8 Key.
Now it's working fine.


Here try to use the id in your exception - 91493442-5A91-11CF-8700-00AA0060263B
D-Kishore 16-Dec-13 3:11am    
Yes i searched with this key, key was found but i am unable to see like 1.8.
Here i can see folders like InprocHandler, InprocHandler32,localserver,localserver32, progid,versionindependentprogid.
Inside TypeLib try to find the Key. Then under Key there must be a number not 1.8. It will differ in your system.
D-Kishore 16-Dec-13 4:27am    
Hi Tadit,

When I search this key {91493442-5A91-11CF-8700-00AA0060263B} inside the HKEY_CLASSES_ROOT-->TypeLib

the key found at HKEY_CLASSES_ROOT\Woe6432Node\Interface\{{91493442-5A91-11CF-8700-00AA0060263B}}

Inside this 3 folders

ProxyStubClsid-inside this
default key:{00020424-0000-0000-C000-000000000046}

ProxyStubClsid32-inside this
default key:{00020424-0000-0000-C000-000000000046}

TypeLib-inside this
default key:{91493440-5A91-11CF-8700-00AA0060263B}
Version:2.9
Here we need to some settings in iis Current project application pool

In IIS Current Applicationpool-advanced settings- enable 32 bit application set it to True.

Everything works fine now.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900