Solved

Script Error - Operation is disallowed on this session

Posted on 2004-10-04
8
2,134 Views
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
0
Comment
Question by:swhite025
8 Comments
 
LVL 14

Expert Comment

by:p_partha
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...

Partha
0
 

Author Comment

by:swhite025
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.
0
 
LVL 31

Expert Comment

by:qwaletee
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."
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:swhite025
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.
0
 
LVL 14

Expert Comment

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

Partha
0
 

Author Comment

by:swhite025
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.
0
 
LVL 1

Accepted Solution

by:
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.
0
 

Author Comment

by:swhite025
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!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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