2014-08-27 55 views
0

我在ASPX一個項目,vb.net和這個應用程序調用COM + DLL,這個DLL讀取註冊表項,在我的VB6應用程序正確地使用這個DLL,但在我的.NET項目中添加此DLL的引用,我得到下面這個錯誤:ASP.NET項目調用VB6 Ddll,錯誤REGDB_E_READREGDB

有人能幫我解決這個錯誤,請...

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 domain: /LM/W3SVC/1/Root/Constito-1-130536231061632161 
Trust level: Full 
Application Virtual Path: /Constito 
Application Path: C:\Constito\ 
Machine name: SERVER-Constito 

過程信息N:

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

異常信息:

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) 
+0

爲什麼這個帖子被downvoted?我看不出有什麼意見來解釋爲什麼和信息是好的。 – 2014-08-27 15:51:09

回答

1

嘗試將應用程序池用戶與Web服務器上的本地管理員權限設置爲一個帳戶。

它看起來像一個註冊表權限問題。

如果不是這樣,它確保GUID(BE0634D8-325E-4A3E-9426-44D52F118BF9)存在於HKEY_CLASSES_ROOT配置單元中。

+0

THX山姆馬爾,你是完全地正確的...現在它的作品對我來說,THX很多! – 2014-08-27 21:04:39