views:

247

answers:

1

Hello

I'm trying to deploy an application which uses an library that embeds an ActiveX control with AxHost in C#.

When I run the installed app on our test rig I catch and present the following exception:

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 ...

I googled 0x800736B1, so I know that it means that a file could not be loaded.

The big Q right now is how to find out which file it is that cant be loaded.

Is there some sort of logging function I can turn on, or is there maybe som way I can get more info from the exception?

A: 

Unless it's your ActiveX code this will be hard or impossible. I suggest using a tool like ProcessMonitor to find which file handle fails. If you have the code you can run it in debug mode, or improve it's logging.

Of course you could always try

Reinstalling the application may fix this problem

C. Ross