Operation is disallowed in this session

Hi All

I have a scheduled agent to do some test on my server e.g getting information on files, extracting ou attching files. Here is the code, really simple

Dim agentLog As New NotesLog(“Agent log”)

Dim session As New notessession

Dim db As NotesDatabase



On Error Goto Error_Exit

Set db = session.CurrentDatabase

Call agentLog.OpenAgentLog	

Call agentLog.LogAction( "Current Directory : "+Curdir$())	

Call agentLog.Close	

End

Error_Exit:

Call agentLog.LogAction("Error line " & Str(Erl) & ": " & Error$)	

Call agentLog.Close	

But I always have this error : Operation is disallowed in this session

I have rights to run restricted lotusscript/java agents on the server.

a precision : I make this agent run on schedule, but it doesn’t run; to test it, I run from another agent with runonserver …

Any help would be appreciated on this issue

Iph

Subject: Operation is disallowed in this session

I find my mistake : I didn’t enable “Allow restricted operations” in the agent tab!

Iph