.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

COMException (0x80040154) for Office interop on IIS 6 x64 system

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :.NET Framework
 

Hello,

 

I have a problem in my ASP.NET Website. I try to interop with Office 11 to display charts.

The application runs since years fine on any 32-bit System I have used. But now we want to switch to a Windows Server 2003 (with IIS 6) and 64- bit.

 

When I open the Chart Page I receive following error:

 

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. at Controls_charting_getmultich.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Category: General Priority: -1 EventId: 0 Severity: Error Title:UserId: 467, ErrorId: 616bd08f-c127-41a6-b305-75defea1bf6a, Exception: Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. Machine: WLM1W790 Application Domain: /LM/W3SVC/1/Root/t-1-129313434346259276 Process Id: 6240 Process Name: c:\windows\system32\inetsrv\w3wp.exe Win32 Thread Id: 2828 Thread Name:

 

 

I searched a lot in the forums and tried everything I could find:

- Installing Excel on the server

- Givi


View Complete Post


More Related Resource Links

System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot open or save any mo

  

Hello good people, 

I have this beast as an error. Did my research and found some posts here as well but did not do any good for me. 

Here is what I did. I had an error regarding issue rights with COM objects so I gave access rights under component services for Microsoft Excel application now I am getting this error. 

Here is some information regarding this

1. Gave rights to ASPNET and network service to my web app directory to try to fix this error. 

2. The exact same process works on my Windows 2003 server and my Windows 7 development machine. I am trying to get this going on a different windows 2003 machine that is outside of our domain.

3. Developing on windows 7 64 bit with office 2010 installed. Also excel 2010 is installed on my Web server

4. Here is the code that is causing the error: The last line is causing the error.:

GC.Collect();
            MyXl = new Microsoft.Office.Interop.Excel.Application();
            MyXl.Visible = false;
            
            MyWb = (Microsoft.Office.Interop.Excel._Workbook)(MyXl.Workbooks.Add(Missing.Value));
            int test = 0; 
            MySheet = (Microsoft.Office.Interop.Excel._Worksheet)MyXl.ActiveSheet;
            if (reader.HasRows)
            {
                int InRow = 2; 
                for (int i = 0; i < Nu

RibbonX API: Extend The 2007 Office System With Your Own Ribbon Tabs And Controls

  

If you want to create your own professional looking tabs and controls in Office, check out the RibbonX API of the 2007 Microsoft Office system.

Eric Faller

MSDN Magazine February 2007


Smarter Art: Create Custom SmartArt Graphics For Use In The 2007 Office System

  

SmartArt incorporates a gallery of templates and predefined shapes that can quickly be inserted and configured in your Microsoft Office documents. Find out how.

Janet Schorr

MSDN Magazine February 2007


Build an Easy Maintenance Intranet Site: Using Office Docs, File System Object, and OLE Structured S

  

If you've ever needed to build an easy-to-maintain intranet site, here's a solution based on Microsoft Office documents. Many sites require constant updating of their HTML, but the use of Word documents can simplify the process. This article details the construction of a human resources site that exploits the File System Object (FSO), OLE Structured Storage, and ActiveX capabilities of Word documents. This allows the HR staff to copy their revised or newly created Word files to the site, dynamically generate a list of links to their files, and free IS from the constant recoding of HR updates into new HTML pages.

Josef Finsel

MSDN Magazine March 2000


How to use Microsoft.office interop.word in website

  
Hi, I have a page which creates a word doc from templet string location = Server.MapPath("~/temp/" + filename); Application app = new Application(); Document doc = app.Documents.Add(location); if(doc != null) { //Some code here } it works fine when i run from visual studio, but when i deploy it as a website in local IIS, its not working.I gave the permissions needed to access the folders in the website. What should i do to make it work. Thanks

saving docx as pdf with Microsoft.Office.Interop.Word in sharepoint

  
Hi!Im trying to export my docx file to PDF with Microsoft.Office.Interop.Word but im stuck. Anyone with some great ideas that could save my day.The code that im running is working fine localy but i can´t get it to work in sharepoint.The most commin exception is file not found (the same path is working fine localy)...Pls give me a hint!

Read Excel sheet by Sheet Name using office interop

  
Hi,I am using office interop to read Excel sheet.I want to read the contents of the sheet  using the name of the sheet.For example I want to read the contents of the sheet- "ABC" (if ABC exists).Thanks

Using Microsoft.Office.Interop.PowerPoint

  
Hi, Im writing a web application  that uses Microsoft.Office.Interop.PowerPoint. When I execute the application from VS 2008 it works fine. I have a .pptx template, I create an instance of PowerPoint, then I open the Presentation, add a Slide and finally I add an excel file as an OLE Object. The code that I'am using is something like this:Imports Microsoft.Office.Interop.PowerPoint Imports PowerPoint = Microsoft.Office.Interop.PowerPoint Dim objPowerPoint As PowerPoint.Application Dim objPresentacion As PowerPoint.Presentation Dim objDiapositiva As PowerPoint.Slide objPowerPoint = New PowerPoint.Application objPowerPoint.Visible = Microsoft.Office.Core.MsoTriState.msoCTrue objPresentacion = objPowerPoint.Presentations.Open("File.pptx") objDiapositiva = objPresentacion.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank) objDiapositiva.Shapes.AddOLEObject(10, 10, , , , "ExcelFile.xlsx") objDiapositiva = Nothing But when I want to execute the application from my localhost I get an error in the AddOLEObject method, the error is something like: HRESULT E_FAIL of a COM component call I don't know what is the problem because from VS 2008 it works fine but from localhost it does not work, all in the same computer. Can anyone help me? Thanks!    

About Microsoft.Office.Interop.Outlook ?

  
My Winforms application need to send email using Outlook Express, since not all client has Ms. Off. Outlook. I only can launch Outlook using System.Diagnostics.Process, which the problem is I can't write HTML message. My question is Microsoft.Office.Interop.Outlook used to handle Ms. Office Outlook only or also can be used to handle Outlook Express ? Is there any API to handle Outlook Express directly ?It's hard to be advanced programmer

About Microsoft.Office.Interop.Outlook ?

  
My Winforms application need to send email using Outlook Express, since not all client has Ms. Off. Outlook. I only can launch Outlook using System.Diagnostics.Process, which the problem is I can't write HTML message. My question is Microsoft.Office.Interop.Outlook used to handle Ms. Office Outlook only or also can be used to handle Outlook Express ? Is there any API to handle Outlook Express directly ?It's hard to be advanced programmer

When attempting to install Security Update Microsoft for the Microsoft 2007 Office system updates (u

  
When attempting to install "Security Update Microsoft for the Microsoft 2007 Office system updates (updates KB2277947 and KB982331)" the sintallation fails and then I recieve the error "The detection failed, this can be due to a corrupted installation database". System Info: XP Home Edition Version 2002 Service Pack 3 Intel Atom CPU N270 @ 1.60 GHz I am running XP and have installed and run the "Fit It" tool, to no avail. I even tried downloading each update individually, from the Microsoft site, instead of through the automatic update. I also read this same question posted by another user (link: http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/cfa66cd3-2aa2-44ee-9393-ffae41d4f70c/) only to find his info contained no answer either. How do I fix this so that I can get these updates installed?

System.Runtime.InteropServices.COMException with Event Handlers

  
hi,           i have written an ItemDeleting Event handler for a document library which holds images. the itemdeleting eventhandler works fine and displays the  errormessage on sharepoint error page when properties.cancel=true and properties.ErrorMessage="This Image is still being used in Announcements. Cannot Delete. ". this works fine when i delete from the doclibrary itself. when i delete the images in the document library from the ImageManger Tool of RadEditor it throws the com exception as follows instead of the sharepoint error page Server Error in '/' Application. -------------------------------------------------------------------------------- This Image is still being used in Announcements. Cannot Delete. 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: This Image is still being used in Announcements. Cannot Delete. can anyone suggest, how to reslove this issue.? i have the screenshots,which would better explain but i dont know how to paste images into this forum? kindly let me know how to upload images to this forums also. thank you all

** Microsoft.Office.Interop.Excel.dll - Do I need Excel installed?? **

  
Hi,I have a VB.Net app which creates an Excel report.  This is all working fine on my development boxwhich turns out to have MS Office 2003 installed.  The app works fine.  I added a reference toMicrosoft Excel 11.0 Object Library under the COM tab when I did the "Add Reference".  I also copiedthe Interop.Excel.dll to my BIN folder.The server that I need to deploy my app to does not have MS Office or Excel installed.  I ran the appanyway just to see if it would worked.  Of course, it failed with this error:Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-000000000046} failed due to the following error: 80040154.Do I need to have Excel installed on the target machine?  I took a copy of "Microsoft.Office.Interop.Excel.dll"from the GAC on the DEV box and installed on the GAC on the target machine.  Tried the app again and stillfailed with the same error.  I really don't want to install Excel if I don't have to.  Can someone please providesome help on this?Thank you in advance!

System.TypeLoadException: Could not load type 'Microsoft.Office.Server.Security.LdapMembershipProvi

  
So this is odd, I am attempting to setup FBA with Sharepoint Foundation 2010 and i get the following Error: (from ULS log viewer): System.TypeLoadException: Could not load type 'Microsoft.Office.Server.Security.LdapMembershipProvider' from assembly 'Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) and in IIS Logs: Exception information:     Exception type: ConfigurationErrorsException     Exception message: Could not load type 'Microsoft.Off

visual studio tools for the office system 3.0 runtime setup

  
Hi, I downloaded "visual studio tools for the office system 3.0 runtime" and installed in my machine.Now when I try to re-install this I get the message asking for "Repair" and "Uninstall" ,but non of this options are selected.Generally "Repair" used to be the default selection on re-installation for any setup installation. Do we have any way to enable this. Thanks, Deb

office search & Error 6482 during encryption or decryption. System error code 0

  

Occured when changed the password, all steps were successfull.

Same problem :http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/6194945b-1ec5-48b4-b827-d4ab998e046c

 Error Information:

04/05/2010 20:08:09.56 OWSTIMER.EXE (0x125C) 0x101C Office Server Office Server Shared Services 7u16 Critical Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (3a49bdd9-0f3e-4044-8def-78a59dd567c1). Reason: Error during encryption or decryption. System error code 0. Techinal Support Details: System.ArgumentException: Error during encryption or decryption. System error code 0. at Microsoft.SharePoint.Administration.SPCredentialManager.DecryptWithMasterKey(Byte[] rgbEncryptedPassphrase) at Microsoft.SharePoint.Administration.SPEncryptedString.GetSecureStringValue(Byte[] rgbEncryptedAlternateKey) at Microsoft.SharePoint.Administration.SPEncryptedString.GetSecureStringValue() at Microsoft.SharePoint.Administration.SPEncryptedString.get_SecureStringValue() at Microsoft.SharePoint.Adm... 04/05/2010 20:08:09.56* OWSTIMER.EXE (0x125C) 0x101C Office Server Office Server Shared Services 7u16 Critical ...inistration.SPProcessIdentity.get_

Word Interop - System.InvalidOperationException in System.Windows.Forms.dll

  

Context:

Microsoft Visual Studio 2005 Version 8.0.50727.42 

Microsoft .NET Framework Version 2.0.50727

Word 2003 Interop


Problem:

I am trying to recreate the "AmbiguousMember" example from p. 31 of Whitechapel's "MS .NET Development for MS Office" using VB instead of VC#.

This involves implementing an event handler for the Word Quit event. In the event handler, I need to toggle the Enabled state of two buttons. This causes the following error:

A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll

The code behind the Form1 form is shown below. Form1 has two buttons: Button1 "Run Word"; Button2 "Quit Word". The event handler is intended to clean up if the user quits the Word application, and reset the buttons.

A net s

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend