Solved

ASP and a trappable error in an external object

Posted on 2004-10-22
775 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
Question by:yoshi78
    17 Comments
     
    LVL 31

    Expert Comment

    by:qwaletee
    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
    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
    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
     
    LVL 9

    Expert Comment

    by:HappyFunBall
    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
    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
    Have you rebooted the server?  The Out of Memory error may not go away until then.
    0
     
    LVL 19

    Expert Comment

    by:RanjeetRain
    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:
    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
    I must be in a hurry. Sorry folks :)
    0
     
    LVL 1

    Author Comment

    by:yoshi78
    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
    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
    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
    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
    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
    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
    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
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

      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…
    Article by: Rob
    Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    934 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now