NET dll引用疑难问题

shen_laofu 2012-03-28 11:49:13
大家好,本人非编程专业,我在这里是第一次发问题,谢谢大家!


1 本人用VS2010 写了个程序,程序中引用了VB写的一个DLL(此DLL 在C# 项目和ASP NET 中使用),程序在其他的机器(WIN 2003)运行正常,而在新装的一台机器WIN2003 上不能使用,出现如下信息:

Server Error in '/Nike_debug' Application.
--------------------------------------------------------------------------------

Unable to cast COM object of type 'xbox360.Class1Class' to interface type 'xbox360._Class1'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{799D4015-CA54-46CB-868F-54C780928B9F}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast COM object of type 'xbox360.Class1Class' to interface type 'xbox360._Class1'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{799D4015-CA54-46CB-868F-54C780928B9F}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

Source Error:


Line 113:
Line 114:
Line 115: return my_dll_class.system_time();
Line 116: //global_variable.shi_jian_shu_xing = my_dll_class.shi_jian_shu_xing(global_variable.system_time);


2 将VS2010 在故障机器上安装重新引用再编译,同样出现错误,出错内容不一样,报类的某些方法不存在,用对象浏览器查看,确实已经丢失了,查看引用后的文件(Interop.xbox360.dll)比正常机器的体积小了很多,正常机器的8KB,当前的为4KB.

3 重装系统两次,故障依旧, 请高人指教,谢谢!
...全文
255 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Michael_LiY 2014-12-10
  • 打赏
  • 举报
回复
Retrieving the COM class factory for component with CLSID {C8B522D0-5CF3-11CE-ADE5-00AA0044773D} failed due to the following error: 800401f9 DLL 中出错 (Exception from HRESULT: 0x800401F9 (CO_E_ERRORINDLL)).?????求指教~~~!
Michael_LiY 2014-12-10
  • 打赏
  • 举报
回复
Retrieving the COM class factory for component with CLSID {C8B522D0-5CF3-11CE-ADE5-00AA0044773D} failed due to the following error: 800401f9 DLL 中出错 (Exception from HRESULT: 0x800401F9 (CO_E_ERRORINDLL)).?????求指教~~~!
shen_laofu 2012-03-30
  • 打赏
  • 举报
回复
谢谢,楼上回复的朋友们。

让我很是困苦啊,已经折磨快一个星期了。

查看系统日志信息,事件代码3005:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/30/2012 12:16:46 AM
Event time (UTC): 3/29/2012 4:16:46 PM
Event ID: d37287e1eee14f4496fc6b03890e1016
Event sequence: 7
Event occurrence: 2
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/Nike_debug-1-129775113912868181
Trust level: Full
Application Virtual Path: /Nike_debug
Application Path: D:\debugSuites\
Machine name: Nike-debug

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

小结下问题,太多了,很乱,自己分不清那里才是核心问题原因,热切希望高手解答。

1 事件代码3005 是调用DLL导致错误,还是由于3005的问题导致引用DLL失败,net framework 2.0 SP2, net framework 4.0都已经安装,且已经生效,也分别配置程序为2.0 ,4.0,都一样报错,不要调用DLL的其他asp net 功能正常。

2 在同一台机器上,拷贝了DLL放在不同的程序目录调用,WINDOWS 应用程序调用DLL成功, 网站程序调用失败,网站的ASP 程序也在调用此DLL但正常,怎么理解???

3 此机器VS2010 引用DLL 不正常(大部分的类丢失),什么原因????

4 不用IIS调试,直接在VS2010调试,同样调用DLL代码报错,那么得出确实不需要检查IIS相关的什么权限问题,与IIS已经无关?
shen_laofu 2012-03-30
  • 打赏
  • 举报
回复
将正常机器的硬盘镜像到故障机器的硬盘,在系列号激活,故障排除,天空特别明朗,走路的脚步是那么的轻快!


感叹也, 总以为自己的是真正的男儿,勇往直前,总会胜利,悔改吧!
xiangaylian 2012-03-29
  • 打赏
  • 举报
回复
首先关注一下,我也碰到类似的问题,调用DCOM组件的时候报这个错误,至今没有解决!

62,242

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧