ASP and a trappable error in an external object

Hello all!

By my subject you can probably tell I'm trying to communicate to a Notes Db via com objects.

I've set up an experimental server that has the notes client with a user.id that is valid and in the notes.ini file.  The same server has IIS running on it.  I'm trying to communicate to a different server that is running Domino but I get a generic "a trappable error in an external object has occurred" error.  If I refresh the page then I get an "Out of memory error"

here's the code. it fails where it's marked *** on refresh with the "Out of memory error"

<%
      dim sess ' as new notes session
***      Set sess = CreateObject("Lotus.NotesSession")
      call sess.initialize()
      Response.Write("...COM object instantiation and initialise OK")
%>

Please someone help!  I'm going bonkers...

Thanks to all!
Yoshi
LVL 1
yoshi78Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

qwaleteeCommented:
If you can, write some VB code that does the same thing, compile it, and exeute it.  That will tell you if it is the instalation or your scrpt.

One of the tricky things about doing this with IIS is that it runs in teh system context.  SHOULD not matter, but sometimes does.

Some other things to look at...
Can you start Notes in a GUI session on that box?
Are the Notes executables in the system path?
Is the NOTES.INI in the Notes executables directory?
0
schubemkCommented:
You should frame your code with an 'On Error' statement to trap the error and see what it is.

0
yoshi78Author Commented:
qwalatee,
notes.ini location is: D:\Program Files\lotus\notes\data
not sure what notes executable are...
and yes I can start a GUI session, though I must provide a password.  I'm using my .id file as a test and can reach all servers and dbs on the domain via the notes client.

Unfortunatly I can't test with vb code.

schubemk,

Sorry,
I'm a rookie at ASP coding.  
I'll look it up and give it a try though.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

HappyFunBallCommented:
I think you're getting the Out of Memory error on the CreateObject call because the first call to s.Initialize crashed.  In other words, the NotesSession object is already in memory from the first time you ran it.  

The Initialize method must contain a password, as in s.Initialize("MyPassword"), if the user.id has a password.  See "Initializing a session" in Domino Designer help.

I've had a lot of trouble with the s.Initialize line, as most configuration problems will cause errors at that line.  But once you get over that hurdle, I've found it to be very reliable and had little trouble using the COM object in my ASP code.  So don't despair!
0
yoshi78Author Commented:
To kind of simplify things, I restarted the IIS server which seems to start the process over.

I then adjusted the code.
<%
      dim sess ' as new notes session
      Set sess = CreateObject("Lotus.NotesSession")
      set sess = nothing

%>
It still happens...
Any ideas?
0
HappyFunBallCommented:
Have you rebooted the server?  The Out of Memory error may not go away until then.
0
RanjeetRainCommented:
IMO it should be something to do with your HTTP task settings. Is domino allowed to use IIS as a server? This is where the problem may lie. IIS may be able to create the object but it may not be accessible to DOmino.

You should also try accessing the DB with COM than OLE. Try Using Lotus.NotesSession.
0
HappyFunBallCommented:
Ranjeet - He said he is using Lotus.NotesSession.

If using a password in the code doesn't fix it (although a password is still required), I'd try the following:

Check nlsxbe.dll in the Domino directory.  Make sure users have rights to the file (you might just give Everyone read/write/read&execute just to rule it out as a problem)

Make sure the setup of Domino with IIS is correct.  Run through the steps from the Domino help.  Make sure that the Domino ISAPI filter is running in IIS.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RanjeetRainCommented:
I must be in a hurry. Sorry folks :)
0
yoshi78Author Commented:
Hi all,

Sorry for the delay.  Like the rest of you I'm sure, I have tons of projects going concurrently.  

Happy,  I do have the nlsxbe.dll file in the correct path with full rights given to everyone.  I think the last suggestion you made is for the case that I'm using IIS to extend domino.  My current set up is:

IIS and a notes client only on one server trying to query or make a connection/open a session on a different physical and logical domino server.

I thought Domino w/IIS and the ISAPI filter was only needed to support running IIS's HTTP task instead of domino's which is not intended.  Sorry if I'm confused or have the wrong setup as opposed to the recommended or traditional setup in the help files, but this is a requirement of my customer.  Thanks for all the help and I've increased the points to allow for an extended session.
Yoshi
0
HappyFunBallCommented:
Yoshi, you're right.  I got on the wrong track there with the Domino for IIS setup.  You don't need that to get this to work.

I'm still unclear on what you've done since you found the error.  Have you rebooted the server?  Have you tried adding a password to the s.Initialize line?
0
yoshi78Author Commented:
Yes, I've added the password and taken it out and taken initialize all together out as well:)

I've rebooted the server and it starts over with the generic "a trappable error in an external object has occurred" error.  If I refresh the page then I get the "Out of memory error" error again.

Thanks!

0
HappyFunBallCommented:
Can you temporarily add the IUSR_<machinename> user to the local Administrators group to see if the error is a security rights issue?  I'm assuming the page is being accessed via the anonymous user.  If you're logging into the page as another NT user, then add that person to the Administrators group and try it.
0
yoshi78Author Commented:
Thanks for all of your help!

I got my customer to allow me to setup a domino server on the same physical server with IIS and followed the instructions in the admin help file.  Seemed pretty easy that way.  My only problem left is that I can't get IIS to serve up domino database files, so I couldn't share this server using domino web apps and ASP's.  But oh well!

Thanks again,
Yoshi
0
HappyFunBallCommented:
Setup the Domino for IIS gets a little tricky, did you follow the instructions exactly in the Notes Help?  If you're using Domino 6.0 + then there's an error in the documentation.  I don't remember it, but I can dig it up if you need it.  Otherwise, it's mentioned a lot at the notes.net Domino 6 forum.
0
yoshi78Author Commented:
I'm on 6.5.1

It's probably where you have to check which services to include and the documentation states something like...check and uncheck all the others.  It doesn't tell you what to check.  I found some help on notes.net though.

Thanks for all of the help.
0
HappyFunBallCommented:
Actually, I remember well that confusing line you describe.  I was confused by it too, but never ended up having any issues regarding the settings.  The error had to do with editing the configuration file.  They probably fixed the documentation by the time 6.5.1 was released so you should be ok.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.