[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ASP and a trappable error in an external object

Posted on 2004-10-22
17
Medium Priority
?
804 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:yoshi78
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 2
  • +2
17 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 12383763
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
 
LVL 1

Expert Comment

by:schubemk
ID: 12383814
You should frame your code with an 'On Error' statement to trap the error and see what it is.

0
 
LVL 1

Author Comment

by:yoshi78
ID: 12383888
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:HappyFunBall
ID: 12384116
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
 
LVL 1

Author Comment

by:yoshi78
ID: 12384213
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
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 12384321
Have you rebooted the server?  The Out of Memory error may not go away until then.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12398016
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
 
LVL 9

Accepted Solution

by:
HappyFunBall earned 1680 total points
ID: 12400440
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
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12400944
I must be in a hurry. Sorry folks :)
0
 
LVL 1

Author Comment

by:yoshi78
ID: 12403989
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
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 12404190
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
 
LVL 1

Author Comment

by:yoshi78
ID: 12404274
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
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 12404370
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
 
LVL 1

Author Comment

by:yoshi78
ID: 12414284
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
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 12421628
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
 
LVL 1

Author Comment

by:yoshi78
ID: 12421692
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
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 12421917
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question