COM class factory error on an XP machine but not on a server

I’ve written a .NET program to access Domino via a Notes client installed on a 2003 server. It works.

Then I copied the program to my XP workstation where I get:

“System.Runtime.InteropServices.COMException (0x80004005): Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 80004005.”

when I try to run it.

In the past, I’ve had this problem on the server with a different program and solved it by making sure that C:\Notes\Data (where my Notes.ini file resides) is at the start of the path. I’ve done this on my workstation but still get the error.

I’m not sure where to look next.

Subject: COM class factory error on an XP machine but not on a server.

Are you sure you’re pointing to the INI file path? By default, the notes.ini in a client install is in the Notes program directory, not in \data.

Subject: RE: COM class factory error on an XP machine but not on a server.

Yes. There was a notes.ini in C:\Notes originally - it was an old one so I renamed it, to be sure it wasn’t being used. I’ve no idea why but our Notes team install the ini file to C:\Notes\Data.

I’ve also checked that if I open a command prompt and point to C:\ and type Notes.ini Notepad opens the correct version of Notes.ini.

I’ve noticed this line:

KeyFilename=C:\Documents and Settings\myUserID\LotusNotes\MyShortName.id

Could it be causing a problem that the ID file is elsewhere? I stuck it in my profile ages ago.

Subject: RE: COM class factory error on an XP machine but not on a server.

Oh, you betcha!

Subject: RE: COM class factory error on an XP machine but not on a server.

Just to clarify, do you mean that the ID file has to be in the PATH or that it has to be in C:\Notes\Data for this to work?

Subject: RE: COM class factory error on an XP machine but not on a server.

It has to be where the keyfile= entry in the INI says it is.

Subject: RE: COM class factory error on an XP machine but not on a server.

Ah, okay. It is where it’s supposed to be then. Weird thing: the problem has gone away. I don’t even think I rebooted my machine between when I had the problem and when I didn’t. I did make changes to the code but superficial design changes to the GUI - no changes at all to the classes that wrap Domino. This is the most frustrating part about working with Domino - mostly it works but sometimes it just won’t.

I thought I had another problem on a server - as part of the investigation of the above problem, I put my app on a different server which also has the Notes client installed. I was getting the old errors. After much frustration, I checked the PATH and found it no longer had C:\Notes\Data. Several bits of software were recently installed and now have entries in the Path. I’m guessing one or other of these replaced the path rather than appending to prepending their entries. Grrrr!

Subject: COM class factory error on an XP machine but not on a server. [My Solution]

I just had this same thing come up.

We had a .NET app running on one box just fine. We then copied that Notes install to another box. When installing Notes (after all the data directories, etc were already copied over) it registered the INI in the Lotus\Notes directory. For whatever reason, my supervisor then moved the INI to the Lotus\Notes\Data directory and this error started. I then moved the INI back to the Lotus\Notes directory and all was well.

I suspect that the Windows Registry has to have the correct path for the INI if you are using the Domino COM. So if I’m correct, you could place the INI in the Lotus\Notes\Data directory, but you’d have to then set that path in the Windows Registry too.

My .02.

The Fonz