Questions tagged [comexception]

COMException is a .NET exception and is thrown when an unrecognized HRESULT is returned from a COM method call.

COMException is a .NET exception and is thrown when an unrecognized HRESULT is returned from a COM method call. COMException is the base class for a set of predefined, standard exceptions.

225 questions
5
votes
3 answers

In Excel VSTO, how can I check if a worksheet belongs to a closed workbook?

If I have a reference to Worksheet and I close it's parent Workbook, the reference doesn't go away. But I can't figure out how I should check to make sure these sheets don't exist. Checking for null doesn't work. Example: Workbook book =…
Kris Harper
  • 5,672
  • 8
  • 51
  • 96
5
votes
0 answers

COMException using WebBrowser control in certain 2008 R2 Environments

In certain 2008 R2 environments and not others, I'm getting a COMExceptions when utilizing a System.Windows.Forms.WebBrowser control. Whether specifying contents via the DocumentText property or invoking the Navigate method with a URL parameter, I…
user851220
  • 1,071
  • 2
  • 7
  • 7
5
votes
1 answer

Windows.Web.Http.HttpClient throws COMException c#

I use Windows.Web.Http.HttpClient in my UWP Windows 10 app. I have created a single instance of the HttpClient in my app and re-using the connection for all the HTTP calls. Everything works fine, except for the parallel HTTP calls. Whenever I iniate…
5
votes
2 answers

System.Runtime.InteropServices.COMException (0x800706BE) when getting contact.LastName

Some of our users are getting this exception sometimes (not for every contact): System.Runtime.InteropServices.COMException (0x800706BE): The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at…
Alex
  • 7,432
  • 20
  • 75
  • 118
5
votes
3 answers

Getting COMException when accessing Emails on Outlook 2010

Hello I am trying to access my emails in Outlook 2010 via a C# Console Application. Visual Studio is started with admin rights and I have added a reference to Microsoft.Office.Interop.Outlook v14.0.0.0 and used it as Outlook. My…
Niklas
  • 23,674
  • 33
  • 131
  • 170
4
votes
2 answers

WatiN, NUnit and CruiseControl.NET-- Error message 800704a6

When running a suite of tests in NUnit with WatiN through CruiseControl.NET (as a service), this error appears: SetUp : System.Runtime.InteropServices.COMException : Creating an instance of the COM component with…
Alan
  • 281
  • 2
  • 9
4
votes
4 answers

Exception from Word.ApplicationClass.Activedocument all of a sudden

I have this single line of code in a Word VSTO add-in project which used to work but suddenly doesn't anymore: Microsoft.Office.Interop.Word.Document doc = Globals.ThisAddIn.Application.ActiveDocument; Before it just returned the Document object as…
ReturningTarzan
  • 1,068
  • 1
  • 13
  • 23
4
votes
1 answer

Using PHP's COM object with Office 2010 (Excel.Application)

I recently coded a script in PHP using the COM object to strip data out of cells in an Excel 2007 spreadsheet into an array. This was all done locally on an XP system with Office 2007. Once I'd enabled the Apache server to interact with the desktop…
Storsey
  • 301
  • 1
  • 3
  • 14
4
votes
1 answer

What could possibly cause COMExceptions while dragging file over the Desktop?

It doesn't crash, all the exceptions I mention here can only be seen in Output window of Visual Studio. Here is the implementation of Dragging: WPF:
dmigo
  • 2,849
  • 4
  • 41
  • 62
4
votes
0 answers

Response.IsClientConnected causes exceptions

We recently tried incorporating Response.IsClientConnected into our asp.net site, but it causes seemingly random exceptions that only show up when we check this property. If we comment out that code, we stop getting the exceptions. We get a ton of…
user1118189
4
votes
1 answer

DialogDebuggerVisualizer: COMException: Object is in a zombie state

On the first time in a debugging session that I try to show the visualizer, it raises that exception (appears at the bottom), I click "Continue" on the exception message dialog and show again the visualizer (by clicking on the "magnifying glass icon…
Tar
  • 8,529
  • 9
  • 56
  • 127
4
votes
3 answers

Outlook COMException

System.Runtime.InteropServices.COMException ..Your server administrator has limited the number of items you can open simultaneously... at Microsoft.Office.Interop.Outlook._AppointmentItem.get_UserProperties() var calendar =…
MikroDel
  • 6,705
  • 7
  • 39
  • 74
3
votes
1 answer

Custom Lync Client fails on startup

I'm writing a custom light-weight in/out board (AKA Status, Presence, etc.) application using the Microsoft Lync 2010 API. It needs to run after startup/login but I've ran into a problem when I login after I start/restart the machine. I get the…
skeletank
  • 2,880
  • 5
  • 43
  • 75
3
votes
2 answers

How to get Excel.Application instance in C#?

I try to get Excel application in my code with this method: Excel.Application xlApp = GetApplication(); if (xlApp == null) xlApp = new Excel.Application(); where private Excel.Application GetApplication() { Excel.Application result =…
3
votes
0 answers

Retrieving the COM class factory for component with CLSID {CLSID} failed?

Complete Exception's Msg - Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154…
1
2
3
14 15