COM Exception: 0x800702E4 in mscorlib while accessing referenced dll function

0

suddenly I have a problem calling any function from a referenced DLL assembly. If I run my assembly without admin privileges I'm getting a COM Exception. This COM Exception only raises on my development Maschine, on any other Maschine with the same user right's (Active Directory Domain & Local Rights) I'm not getting this COM Exception.

The Function called shouldn't need any elevated rights. Does anyone has an idea what could be wrong?

Translatet Exception:

An unhandled exception of type 'System.Runtime.InteropServices' occured in the mscorlib.dll.

Additional Information: Retrieving the COM class factory for component with CLSID {ACE5AE23-982C-4033-BD09-DE533993C9A5} failed due to the following error: 800702e4 The requested operation requires elevation. (Exception from HRESULT: 0x800702E4).

Original Exception (German): Ein Ausnahmefehler des Typs "System.Runtime.InteropServices.COMException" ist in mscorlib.dll aufgetreten.

Zusätzliche Informationen: Die COM-Klassenfactory für die Komponente mit CLSID {ACE5AE23-982C-4033-BD09-DE533993C9A5} konnte aufgrund des folgenden Fehlers nicht abgerufen werden: 800702e4 Der angeforderte Vorgang erfordert erhöhte Rechte. (Ausnahme von HRESULT: 0x800702E4).

c#
exception
com
elevated-privileges
asked on Stack Overflow Apr 19, 2016 by kami • edited Aug 1, 2016 by kami

1 Answer

0

Solution:

For some Reason the dll was flagged to "RunAsAdministrator" in the Windows Registry under:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers resp. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

After removing this Flag everything worked as supposed again.

answered on Stack Overflow Apr 20, 2016 by kami

User contributions licensed under CC BY-SA 3.0