ASP.NET project calling a VB6 Ddll, error REGDB_E_READREGDB

0

I have a project in aspx with vb.net and this app calls a COM + DLL, and this DLL reads a registry key, in my VB6 app uses this DLL correctly, but adding this DLL's references on my .NET project, i get this error below:

Somebody help me with this error, pls...

Event code: 3005
Event message: An unhandled exception has occurred. 
Event time: 27/8/2014 11:25:13 
Event time (UTC): 27/8/2014 14:25:13 
Event ID: c94e2752e983457cb159dc7d9e5f75a1 
Event sequence: 7 
Event occurrence: 1 
Event detail code: 0 

Application information:

Application domain: /LM/W3SVC/1/Root/Constito-1-130536231061632161 
Trust level: Full 
Application Virtual Path: /Constito
Application Path: C:\Constito\ 
Machine name: SERVER-Constito

Process information:

Process ID: 7116 
Process name: w3wp.exe 
Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information:

    Exception type: Exception 
    Exception message: 
      Unable to cast COM object of type 'System.__ComObject' to interface type 'U_Master.Obj'. 
      This operation failed because the QueryInterface 
     call on the COM component for the interface 
     with IID '{BE0634D8-325E-4A3E-9426-44D52F118BF9}' 
     failed due to the following error: 
     Could not read key from registry 
     (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB)).
   at Constito.Master.Post_DadosVB6(Object obj, String acao, String xmlArg, String p_cd_usuario) in C:\Constito\Master.vb:line 102
   at Constito.Principal.Page_Load(Object sender, EventArgs e) in C:\Constito\Principal.aspx.vb:line 30
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean 
includeStagesAfterAsyncPoint)
asp.net
vb.net
dll
vb6
registry
asked on Stack Overflow Aug 27, 2014 by Marcus Vinicius • edited Aug 27, 2014 by rene

1 Answer

1

Try setting the Application Pool user to an account with local admin privileges on the Web Server.

It looks like a registry permissions issue.

If thats not it ensure that the GUID (BE0634D8-325E-4A3E-9426-44D52F118BF9) exists in the HKEY_CLASSES_ROOT hive.

answered on Stack Overflow Aug 27, 2014 by Sam Makin

User contributions licensed under CC BY-SA 3.0