2009-04-21 121 views
0

我想部署一個應用程序,它使用在C#中嵌入AxHost的ActiveX控件的庫。從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,所以我知道這意味着文件無法加載。

大Q現在是如何找出其中文件是不能加載的。

是否有某種形式的日誌記錄功能,我可以打開,或者是有可能SOM方法可以讓我得到異常的詳細信息?

回答

0

除非它是你的ActiveX代碼,這將是很難或不可能。我建議使用ProcessMonitor之類的工具來查找哪個文件句柄失敗。如果你有代碼,你可以在調試模式下運行它,或者改進它的日誌記錄。

當然,你總是可以嘗試

重新安裝這個程序可能修復 這個問題