我正在尝试部署一个应用程序,它使用一个库将ActiveX控件嵌入到C#中的AxHost中。
当我在我们的测试平台上运行已安装的应用程序时,我捕获并呈现以下异常:
Unexpected exception.
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at ....InitializeComponent()
at ...我搜索了0x800736B1,所以我知道这意味着文件无法加载。
现在最大的问题是如何找出哪些文件不能加载。
是否有某种类型的日志功能,我可以打开,或者有可能有方法,我可以获得更多的信息,从例外?
发布于 2009-04-21 12:27:13
除非是您的ActiveX代码,否则这将是困难的或不可能的。我建议使用像ProcessMonitor这样的工具来查找哪个文件句柄失败了。如果您有代码,您可以在调试模式下运行它,或者改进它的日志记录。
当然,你总可以试试
重新安装应用程序可能会解决此问题。
https://stackoverflow.com/questions/772293
复制相似问题