问题描述
程序运行时抛出异常:Seetheendofthismessagefordetailsoninvokingjust-in-time(JIT)debugginginsteadofthisdialogbox.**************ExceptionText**************System.Runtime.InteropServices.COMException(0x80040154):没有注册类别atSystem.Windows.Forms.AxHost.CreateInstance()atSystem.Windows.Forms.AxHost.GetOcxCreate()atSystem.Windows.Forms.AxHost.TransitionUpTo(Int32state)atSystem.Windows.Forms.AxHost.CreateHandle()atSystem.Windows.Forms.Control.CreateControl(BooleanfIgnoreVisible)atSystem.Windows.Forms.Control.CreateControl(BooleanfIgnoreVisible)atSystem.Windows.Forms.AxHost.EndInit()atSales.Client.retail.InitializeComponent()ind:softitemsuperclientretail.cs:line785atSales.Client.retail..ctor()ind:softitemsuperclientretail.cs:line109atSales.Client.MainFrm.MmerconhandSale_Click(Objectsender,EventArgse)inD:softItemsuperClientMainFrm.cs:line893atSales.Client.frmShow.btnSales_Click(Objectsender,EventArgse)inD:softItemsuperClientfrmShow.cs:line172atSystem.Windows.Forms.Control.OnClick(EventArgse)atSystem.Windows.Forms.Button.OnClick(EventArgse)atSystem.Windows.Forms.Button.PerformClick()atSystem.Windows.Forms.Form.ProcessDialogKey(KeyskeyData)atSales.Client.frmShow.ProcessDialogKey(KeyskeyData)inD:softItemsuperClientfrmShow.cs:line167atSystem.Windows.Forms.Control.ProcessDialogKey(KeyskeyData)atSystem.Windows.Forms.Control.PreProcessMessage(Message&msg)atSystem.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG&msg)**************LoadedAssemblies**************mscorlibAssemblyVersion:1.0.5000.0Win32Version:1.1.4322.573CodeBase:file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll----------------------------------------superAssemblyVersion:1.0.2883.18791Win32Version:1.0.2883.18791CodeBase:file:///G:/super/bin/Debug/super.exe----------------------------------------System.Windows.FormsAssemblyVersion:1.0.5000.0Win32Version:1.1.4322.573CodeBase:file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll----------------------------------------SystemAssemblyVersion:1.0.5000.0Win32Version:1.1.4322.573CodeBase:file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll----------------------------------------System.DrawingAssemblyVersion:1.0.5000.0Win32Version:1.1.4322.573CodeBase:file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll----------------------------------------System.XmlAssemblyVersion:1.0.5000.0Win32Version:1.1.4322.573CodeBase:file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll----------------------------------------Sales.SalesBLLAssemblyVersion:1.0.2883.18789Win32Version:1.0.2883.18789CodeBase:file:///G:/super/bin/Debug/Sales.SalesBLL.DLL----------------------------------------System.DataAssemblyVersion:1.0.5000.0Win32Version:1.1.4322.573CodeBase:file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll----------------------------------------Sales.SalesDALAssemblyVersion:1.0.2883.18788Win32Version:1.0.2883.18788CodeBase:file:///G:/super/bin/Debug/Sales.SalesDAL.DLL----------------------------------------System.EnterpriseServicesAssemblyVersion:1.0.5000.0Win32Version:1.1.4322.573CodeBase:file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll----------------------------------------AxInterop.ShockwaveFlashObjectsAssemblyVersion:1.0.0.0Win32Version:1.0.0.0CodeBase:file:///G:/super/bin/Debug/AxInterop.ShockwaveFlashObjects.DLL----------------------------------------**************JITDebugging**************Toenablejustintime(JIT)debugging,theconfigfileforthisapplicationormachine(machine.config)musthavethejitDebuggingvaluesetinthesystem.windows.formssection.Theapplicationmustalsobecompiledwithdebuggingenabled.Forexample:<configuration><system.windows.formsjitDebugging="true"/></configuration>WhenJITdebuggingisenabled,anyunhandledexceptionwillbesenttotheJITdebuggerregisteredonthemachineratherthanbeinghandledbythisdialog.请高手指点???
解决方案
解决方案二:
不是kernel32.dll的问题,这个是核心dll,如果出问题不止你的程序有问题。你在看看其他有调用过com组件的地方
解决方案三:
先照异常提示的做,或者捕捉一下,断点看看异常到底是什么.应该是你使用的某个ActiveX控件有问题
解决方案四:
Flash控件的问题