Groups | Blog | Home
all groups > dotnet interop > february 2008 >

dotnet interop : Error running app in production



Mr. Arnold
2/16/2008 9:18:47 PM

[quoted text, click to view]

---------------------------------------

What it means is that you have a Object reference to a DLL, and the DLL is
not there on the target machine where the applications is running, so it
can't create an Object derived from the DLL that is not there. As opposed
to this DLL being on your development machine where the Object can be
derived from the reference you had set in the development project to the
DLL. Or the DLL is there. but it's dependant upon another DLL that is not
there.

You need to find out what that DLL is that is not on the client's machine,
and you include it in your setup package so that it gets installed with your
application. You never assume that a client machine is going to have all
components you need for your application to run properly. You must make sure
your setup package has all the components that must be installed with the
application in the application's setup packet and install them no matter
what, even if they are all ready there.



kimiraikkonen
2/16/2008 11:33:25 PM
[quoted text, click to view]

First you must see which DLLs you have referenced doing:

To remove a reference in Visual Basic
1-In Solution Explorer, double-click the My Project node for the
project.

2-In the Project Designer, click the References tab.

3-In the References list, locate the library that you referenced.

Then post the dll name or search it on the client machine which is
kimiraikkonen
2/16/2008 11:35:03 PM
[quoted text, click to view]

Correction: Do these steps to see the dll that's refenced, not to
remove it.

[quoted text, click to view]
John
2/17/2008 1:11:17 AM
Hi

I created a setup file of my app and remotely installed it on a clients
machine. The app bombs at start-up with the error;

Error while initializing application: Retrieving the COM class factory for
component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to
the following error: 8007007e.

The application also gave a stack trace which is given below at the end.
What's more there is no JIT debugger on the target system. What is the
problem and how can I proceed from here specially when I have little or now
way to debug the app on the target system.

Many Thanks

Regards



Stack Trace
========

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an
object.
at EMS.frmClients.RefrshDropDowns(Boolean FirstTime)
at EMS.frmClients.BindFieldstoDataSource()
at EMS.frmClients.frmClients_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at EMS.frmMain.OpenForm(String x, Int32 id)
at EMS.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
IV
Assembly Version: 1.0.2968.12064
Win32 Version: 1.0.2968.12064
CodeBase: file:///C:/Program%20Files/IV/Events%20Manager%202008/IV.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Infragistics2.Win.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.v7.3.DLL
----------------------------------------
Infragistics2.Shared.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Shared.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinToolbars.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinToolbars.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinExplorerBar.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinExplorerBar.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinStatusBar.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinStatusBar.v7.3.DLL
----------------------------------------
Infragistics2.Win.Misc.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.Misc.v7.3.DLL
----------------------------------------
System.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Data
John
2/17/2008 2:43:15 AM
Thanks. Is there a way to pin point which dll is it that is required?

Thanks again.

Regards

[quoted text, click to view]

Steve Gerrard
2/17/2008 4:37:20 PM
[quoted text, click to view]

From your original post:

[quoted text, click to view]


Presumably RefrshDropdowns(Boolean FirstTime) is a method you wrote, and that's
where the error occured. Taking a good look at that method may give you a hint
of which object reference was not set, from which you can deduce which dll is
missing. It is apparently a COM object, and COM dlls are not always included
automatically by install builders for .Net apps.




Misbah Arefin
2/17/2008 6:02:00 PM
a little bit of google revealed that's definitely the CLSID for Outlook. The
trivial explanation: do you have Outlook installed on your clients machine?

--
Misbah Arefin



[quoted text, click to view]
Mr. Arnold
2/17/2008 7:24:09 PM

[quoted text, click to view]

What I would do is go back to development project and look at all the DLL(s)
that are being referenced make sure they are included in the setup package.
I would also use a DLL dependency checker on each DLL to what other DLL(s) a
given DLL is dependant upon and include those DLL(s) in the setup project.

One thing you can do in your project is put Try/Catches in your code, and if
the Exception.InnerText is not null the display that message, as that
message will help you pin point things.
Norman Yuan
2/17/2008 10:37:40 PM

[quoted text, click to view]


And you are using Outlook200? in your developing box? If it is Outlook2007,
then that is where the proble is from. Or is this app a win desktop app run
by a logged in user? Does the user have his Outlook profile set up before
running your app? Are you automating Outlook from your Win form app? More
information will definitely help identify possible problems.


[quoted text, click to view]
John
2/18/2008 2:43:21 AM
Yes, Outlook 2003 is installed.

Thanks

Regards

[quoted text, click to view]

Claes Bergefall
2/18/2008 11:13:02 AM
That CLSID is present in Outlook 2003 (I have it on my machine)
The error 0x8007007E is ERROR_MOD_NOT_FOUND ("The specified module could not
be found") wrapped in a COM HRESULT

Start by checking the registry on the deployment machine to ensure that the
COM object is registered correctly. If it's there try using OleView.exe
(just copy it from your dev machine) to create an instance of it. In OleView
it should be in All Objects under the name "Microsoft Office Outlook" (there
might be more than one entry with that name so make sure you try the correct
one)

/claes

[quoted text, click to view]

John
2/19/2008 2:07:31 AM
Hi

In OleView when I try to expand the Microsoft Outlook 8.0 Object Library
node by clicking on the + sign I get the below error;

CoGetClassObject failed.
The specified module could not be found.
Severity: SEVERITY_ERROR, facility: FACILITY_WIN32 ($8007007E)

What can I do from here?

Thanks

Regards

[quoted text, click to view]

Claes Bergefall
2/19/2008 9:30:48 AM
Are you sure the name is Microsoft Outlook 8.0 Object Library? If you have
Outlook 2003 installed it should be version 11.0, not 8.0. On my machine the
name is Microsoft.Office.Outlook.

Anyway, it sounds like something is wrong with the installation. Try
reinstalling Outlook (uninstall all previous ones first).

/claes


[quoted text, click to view]

AddThis Social Bookmark Button