Link to home
Start Free TrialLog in
Avatar of bryker
bryker

asked on

Domino Objects?

I just need some redistributable executable that I can use to just install the Domino COM objects on another Windows computer.

My .NET application interops with the Domino COM libraries.  Now I just need to enable another (server) computer to do the same thing.  But it works on my PC because I have the Lotus Notes email client, which installed the Domino components.  I now need to redistribute just those components--not the entire email client.

Thanks!
Avatar of bryker
bryker

ASKER

Avatar of bryker

ASKER

Basically, here's what I need--only this is just the poster documentation of the object model.

http://www-10.lotus.com/ldd/notesua.nsf/0/5ce89036c48b2fd585256df1006bacc8

Thanks!
Avatar of bryker

ASKER

Yikes.  Notice the editor's note here:

http://www-128.ibm.com/developerworks/lotus/library/ls-COM_Access/

That's what I'm after.

I have these components myself; why can't I find and download them?  I don't want to start off the hunt-and-peck method of pushing one COM library over to this server, registering it, then trying my app, then getting a handful more, doing the same, etc.
How does the .NET application interop with the Domino Objects.  I assume at some point you need to create a Session object and to do this it is probably using your id file and information from your notes.ini file to find the correct id file.  I would say that the only feasible way to install your .NET application is to do a minimal install of Lotus Notes.  There is no smaller redistributable package as far as I know.
ASKER CERTIFIED SOLUTION
Avatar of mshogren
mshogren

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bryker

ASKER

>Do not confuse these with the OLE automation objects Notes.NotesSession and Notes.NotesUIWorkspace.

My code, which works great, has one annoyance--I am actually having to create a variable of type NotesSession.  When I call its .Initialize() method, I'm actually prompted to enter my password (which works).

So it sounds like the OLE automation classes it mentions are indeed what I need.

>The KeyFileName setting in the names.nsf file specifies the user ID that COM uses.

I wish there were some way of also supplying the password, so that this annoying prompting wouldn't happen.  (The .Initialize() method of that aforementioned NotesSession class does indeed accept a password parameter, but ignores it.)

Anyway, great, mshogren.  Let me get the Notes client installed and see where I am after that.

Avatar of bryker

ASKER

The COM toolkit does seem to be mentioned here, also, as well as in the link provided earlier:
http://www.vcode.no/resource.nsf/GSWNAPI/387.htm
Avatar of bryker

ASKER

I dunno...fails with:

>System.OutOfMemoryException: Retrieving the COM class factory
>for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7}
>failed due to the following error: 8007000e

It installed successfully, but who knows.  The docs that you found say Domino needs an NSF file, but who knows how those should be created, set up, etc?  I created one--a blank one--and put it in the Notes program directory.  Fails the same, with or without it.
According to the documentation which came with the COM toolkit it only contains samples, not extra components.  This toolkit hasn't been updated since R5 as far as I know and is no longer available on the main developerworks website for download.
Have you actually run Notes on the machine you installed it too.  Until you do it isn't fully installed.
As far as OLE goes, to use it you actually require Notes to be running, so I would say you should stick to COM.
Avatar of bryker

ASKER

Okay.  Well, I went through setup.  Didn't set up any accounts/locations, because my app specifies those at run-time.

Now, I get no error, but my app (a SharePoint web part) times out.  I've uninstalled and reinstalled LN multiple times now, just in case something occurred to me that would cause it to work.

No more failures about COM now, at least.  But it times out each time.  I have a feeling that it's an identity problem--I have no names.nsf file now--but there's just no way to be sure.  Maybe there are other components necessary to make this work.
Avatar of bryker

ASKER

Today may prove to be a little more promising...I copied my own names.nsf and user.id files from my laptop to the server.  Now the OpenDatabase() method throws the exception, "Database open failed (%1)".

OpenDatabase() takes the filename ("PhoneList.nsf") of the database as its parameter.  This statement follows a statement which is evidently not throwing an exception, GetDbDirectory()--which takes a servername as its parameter.  And I *am* able to ping the server I'm specifying from this server.



So you are using code like this:

Set dir = s.GetDbDirectory("servername")
Set db = dir.OpenDatabase("PhoneList.nsf")

Can you debug this code line by line or perhaps add a line in between these two like this one to ensure the dir is being set.

Msgbox dir.Name

Another thing to try would be to find a database on the local machine by using this code:

Set dir = s.GetDbDirectory("")
Set db = dir.OpenDatabase("PhoneList.nsf")
Avatar of bryker

ASKER

mshogren, thanks for sticking with me on this.

I do output the DBDir.Name value.  It shows the proper server name.

What I tried just now was to go into Lotus Notes on the server and try to set some of its "Location Preferences" values to be like mine on my laptop.  (I'm just trying anything at this point.)  Now I get the following:

   Password or other security violation for database XCOMNOTES_1/XCompany!!PhoneList.nsf

I'll try to back out whatever username/password settings I just plugged in and try 'er again.  Thanks.
Avatar of bryker

ASKER

I changed the "Location type" setting from LAN back to "No connection", and I'm back to the "Database open failed (%1)" error message.
Sounds like you are getting close.  Make sure that the Location is setup to be a LAN connection and then make sure that the id you are using has access to the database you are trying to open.  If all else fails set the Default access to the PhoneList database to be Manager for testing purposes.
Avatar of bryker

ASKER

I reinstalled Lotus Notes yet again.  Not sure how many settings to set up for it, so I set up as few as I can to get the setup complete.

Quick summary of my current findings:

   o  When I have no user.id file on the machine at all, I get a "Could not open the ID file" error.
   o  When I put the user.id file (mine, from my laptop), at "...\All Users\Application Data\Lotus\Notes\Data", I get the same thing--"Could not open the ID file".
   o  When I put that same file at *my own* "...\<me>\Local Settings\Application Data\Lotus\Notes\Data", it hangs.  Web browser eventually times out.
   o  GetDBDirectory() does seem to work.  OpenDatabase() does not.  I seemed to get this far only when I put my names.nsf and user.id files at "C:\Program Files\lotus\notes".

Crap, I give.  I think I've given the ol' college try, and really, there just isn't evidence on the internet of people accomplishing what I'm trying to do here.  I'll keep trolling, and I'll post here if anything new develops.

Thanks.
One place to check settings is in the notes.ini file under c:\Program Files\lotus\notes  You can use this to set the data directory to a location other than \<me>\Local Settings\Application Data\Lotus\Notes\Data for instance.  Let me know if I can provide any further assistance.
Avatar of bryker

ASKER

I don't have any such file at that location...I don't have one under <All Users> either, just under <me>.

Which is annoying.  Basically, all the configuration I have set up for LN on this server would only work if someone using this web part came into the site authenticated as me.  Great.

Tyr copying this file to where I suggested.  notes.exe looks for it anywhere that is defined in the path or in the same directory as the the exe files are installed.
Avatar of bryker

ASKER

mshogren, I'm looking at this notes.ini file--what exactly does it have that I'm interested in changing?  I'm just seeking to understand.  I can change it's paths, sure, but it's not like I can identify any file "goodies" that I'm not picking up.  I can't get it to read something across the network; I'm not sure how these entries would help me do that, and what exactly I should change about them.

Know what I mean?
Avatar of bryker

ASKER

>I can't get it to read something across the network

Sorry, this is unclear.  I meant that my app isn't reading a LN database located on the network...and I'm not sure how the INI file will help me out with that.
I am just worried trying to get you to a point where the notes.ini and names.nsf files are not accesible only from your account.  They should probably be a in a more public place, as should the id file.  So if you can move notes.ini and the paths it points to out from under your personal folders then you may have more success.
Avatar of bryker

ASKER

Okay, well, I altered my notes.ini file to look like this:

[Notes]
KitType=1
SharedDataDirectory=C:\Documents and Settings\All Users\Application Data\Lotus\Notes\Data\Shared
InstallType=6
Directory=C:\Program Files\lotus\notes
FaultRecovery_Build=Release 6.5.3
Timezone=6
DSTLAW=4,1,1,10,-1,1
PhoneLog=2
Log=log.nsf, 1, 0, 7, 40000
FileDlgDirectory=C:\Documents and Settings\bryker\My Documents
CONSOLE_W3WP=80 25 7 44 44 696 375
DST=1
MailType=0
$$HasLANPort=0

and put this file in the C:\Program Files\lotus\notes directory.  Didn't change anything; app hangs when I leave a user.id file there, and says "Could not open the ID file" when I delete it and run the app again.  Which is how it performed before.

I guess I am almost out of ideas for why it hangs.  You could try modifying the user.id to have no password under or get an id without a paasword such as the server.id off the Domino server.  Then you could rule out authentication being a problem.
Avatar of bryker

ASKER

This is great.  See, this is stuff I don't know.  How would you modify the user.id?  What do you mean by server.id?
On the Domino server (if you have one available) there will be a file with a .id extension which identifies the server.  It typically has no password so that one doesn't have to be entered to start the server.  To change your password to be nothing you will have to go to File-->Security--> User Security.  You may not be allowed to have a blank password depending on what you password quality settings were when you were setup.  If you have the Domino Administrator account you can try registering a new user in the same groups as you are in with a blank password.  Of course maybe none of this is the problem at all.  It is a bit hard to tell.
Avatar of bryker

ASKER

Did you also mean in your previous email that there's some way to modify the user.id on the local box?
Yes.  You can change the password using File-->Security--> User Security or you can switch to another id if you have one using File-->Security--> Switch Id
Avatar of bryker

ASKER

I changed my password on that server.  Didn't help.  No matter what I change it to, it says "wrong password", no matter how careful I am about being absolutely positive that what I change it to is the same as what I supply it through code.

So, I've now uninstalled and reinstalled bare-bones again.  I supply it an empty string password, and always get "Database open failed" and "Database has not been opened yet" whenever I try to open the DB and conduct a full-text search.

Square one.  Oh, well.  I know it's probably something to do with authentication or remote access, but finding out just what is almost impossible.