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
3
votes
2 answers

UserPrincipal.FindByIdentity results in COM error 0x80005000

I've an MVC Intranet app that I've recently upgraded from .Net 4 to 4.6.1. This app queries user details from Active Directory to load details that aren't available in the Controller's User.Identity property and until lately has done so flawlessly.…
Pete
  • 1,807
  • 1
  • 16
  • 32
3
votes
1 answer

COMException: The object invoked has disconnected from its clients

I have a program written in C# that creates a Word doc by collating a bunch of text (extracted from objects). This application has worked fine for the past 4 years on many different machines, but right now it is breaking for one new client with the…
Mossi
  • 997
  • 5
  • 15
  • 28
3
votes
2 answers

C# Multithreaded Access on Excel File

I'm coding on an multithreaded C# Application which provides some statistics for an Excel File. I opened the File by following Code: private static Excel.Application excelApp = new Excel.Application(); private static Excel.Workbook workbook…
P. Edge
  • 105
  • 1
  • 7
3
votes
1 answer

Symbolic Names for COMException HRESULT Error Codes in .NET

I would like to be able to use the standard symbolic names for HRESULTs returned by COM components in my .NET code. For example, I'd like to be able to write code like this: try { someComObject->DoSomething(); } catch (COMException ex) { if…
Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302
3
votes
3 answers

NUnit Test with WatiN, runs OK from Dev10, but when NUnit started from "C:\Program Files (x86)\NUnit 2.5.5\bin\net-2.0\nunit.exe"

I have the following code in an Nunit test ... string url = ""; url = @"http://localhost/ClientPortalDev/Account/LogOn"; ieStaticInstanceHelper = new IEStaticInstanceHelper(); ieStaticInstanceHelper.IE = new IE(url); …
user206890
  • 531
  • 6
  • 17
3
votes
3 answers

Loading an image file in WinRT

I have a WinRT project, and am getting an error when trying to preview an image. I have set capabilities to allow access to the Pictures library, and am using the following code: var file = await…
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
3
votes
1 answer

Visual Studio crashes when I debug a project with a certain form open in design mode..."Catastrophic failure"

As the title says, VS2008 keeps crashing on me whenever I debug a project when a certain form is open. I attached another VS2008 instance to it and found the following exception to be the culprit: System.Runtime.InteropServices.COMException…
NickAldwin
  • 11,584
  • 12
  • 52
  • 67
3
votes
1 answer

Random COMException on Web App "The handle is invalid"

All of a sudden, I am consistently getting a weird COMException on this machine when I try serve a web app with IIS. I never used to have any problems with this. Stack Trace: [COMException (0x80070006): The handle is invalid. (0x80070006…
Josh Stodola
  • 81,538
  • 47
  • 180
  • 227
3
votes
0 answers

DirectoryEntry authentication throws COMException instead of DirectoryServicesCOMException

I'm using .NET and creating a DirectoryEntry and the access the NativeObject member to validate a user's credentials against AD. There are some situations, where the login will fail, because the "User must change password on next logon" flag is set…
3
votes
1 answer

FilePathResult with network path throws COMException (The handle is invalid)

I am using the FilePathResult like so: return new FilePathResult(path, "text/xml"); My path is a path elsewhere on our network. This results in a server error. When I check the event log on the server I can see this error entry: TransmitFile…
Justin Helgerson
  • 24,900
  • 17
  • 97
  • 124
3
votes
1 answer

Why VS2010 stops on COMException if exists a try catch and the exception settings is set to not throw on first-chance

I have the following code: try { ((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).EndInit(); } catch { } And I have the Exception dialog configured to not stop on anything handled: Anyway VS stops on the following exception and…
Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
2
votes
0 answers

COMException when generating ClickOnce manifest

During the build of my WPF project I sometimes get this error : The "GenerateApplicationManifest" task failed unexpectedly. System.Runtime.InteropServices.COMException (0x941270C0): Exception from HRESULT: 0x941270C0 at…
Andrei Rînea
  • 20,288
  • 17
  • 117
  • 166
2
votes
3 answers

How to check ErrorCode for REGDB_E_CLASSNOTREG?

try { // call to Com Method } catch (COMException e) { if (e.ErrorCode == 0x80040154) // REGDB_E_CLASSNOTREG. { // handle this error. } } I would like to check if com exception is thrown due to REGDB_E_CLASSNOTREG then handle…
AksharRoop
  • 2,263
  • 1
  • 19
  • 29
2
votes
0 answers

Error: Caused by: com.sun.jna.platform.win32.COM.COMException: Class not registered(HRESULT: 80040154) (puArgErr=)

I'm running my java spring application's test cases on my WIN 10 machine and I started to see these errors, is there any way to avoid these COM errors /workaround? Caused by: com.sun.jna.platform.win32.COM.COMException: Class not registered(HRESULT:…
Santosh Ravi Teja
  • 247
  • 1
  • 7
  • 18
2
votes
1 answer

Preventing ComExceptions when querying via WMI

I've got some code that uses WMI to scour a windows domain for computers matching certain criteria. I get a COMException If I'm unable to communicate with the computer I'm trying to query. When testing on a large domain, this can result in thousands…
Joe Zack
  • 3,268
  • 2
  • 31
  • 37
1 2
3
14 15