Script Error - Operation is disallowed on this session

Posted on 2004-10-04
Last Modified: 2013-12-18
MY Domino server version is 6.5.3 for windows/32 and the OS is win2000 server. My agent connects to an LDAP server, looks up an email address and returns with the results.  This LotusScript searches the LDAP Server using Microsoft ActiveX Data Objects (ADO) and Active Directory Service Interface (ADSI) provider. The program constructs an SQL statement for the search and passes it to the "execute" method of the "ADODB.Connection" class.

The agent runs fine from the Notes client. However, when the agent runs per a schedule it throws the error:
 "Operation is disallowed on this session".

The "Set" line of the following code causes the error:

Sub Initialize
      Dim adoConn As Variant
      Set adoConn = CreateObject("ADODB.Connection")
      adoConn.Provider = "ADSDSOObject"
      adoConn.Open "ADs Provider"
End Sub

suggestions?  thanks in advance
Question by:swhite025
LVL 14

Expert Comment

ID: 12223114
When you run this application manually it runs from your client and also check whether the required software is installed, and  it's always better to have a system dsn in the server...


Author Comment

ID: 12226767
As I stated in the question, the agent runs flawlessly when initiated from the Notes client. It only throws the error when it runs on a schedule - run by the server. The server can "see" (telnet and ping) the LDAP box.
LVL 31

Expert Comment

ID: 12228211
It is a permissions problem.  The client always allows all operations that are local to teh client, including ActiveX calls, unless locked out by the ECL.  The server normally restricts these.  The person who saved/signed the agent has to be in the servers' Allow Restricted LotusScript setting, on the server doc security tab.

Why?  Because otherwise, I could, say, use an ActiveX object that is outside the security control of the Notes server, and the server has to be told "trust S. White to do such security-risky operations."

Author Comment

ID: 12230061
Thanks for your response. I re-checked the permissions in the server document, the security tab, "Run unrestricted methods and operations:". The admin id (the signer of the agent according to the agent's properties) is listed in that section as having those priviledges. According to the help bubble for this item, inclusion of  that id should allow it to run agents in all programmable languages and interfaces without restriction.

But I still get the same error.
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

LVL 14

Expert Comment

ID: 12231167
When you run it manually a agent runs in the client, not at the server, So does all this products which are referenced and the dsn's installed in the server


Author Comment

ID: 12233289
Partha, i have the Notes client installed on the server (C: instead of D:) and the agent runs fine from that client. Also, the LDAP server has an entry in the Domino server's host file. I believe that I need to install / load some other product(s) on the server that would enable Domino to access the LDAP server - just as the Notes client can. But, I do not know what those services (products) are.

Accepted Solution

schubemk earned 250 total points
ID: 12258276
Open the agent using an R6 designer client and look at the agent's properties.  The second tab in this dialog box (with the little key) has a section called "Set Runtime Security".  It sounds like you have it set to "1. Do not allow restricted operations".  I think you will have to bump it to "3. Allow restricted operations with full administrative permissions" for the ADO calls to work.

Try scheduling it to run with the permission level 3.  If that solves your problem, try it on permission level 2 and see if it still functions.  If not, switch it back to 3.

Author Comment

ID: 12258624
schubemk,  thank you so much!!!! now the agent runs in the background on a schedule - and i don't have to run it manually every day. you have saved me a huge amount of effort!

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

9 Experts available now in Live!

Get 1:1 Help Now