Problem solve Get help with specific problems with your technologies, process and projects.

Log file error: You are not authorized to use the server

I have coded a simple agent in LotusScript that sends an e-mail when a user clicks a button on a form using a Web browser. My code inside the agent is as follows:

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Dim collection As NotesDocumentCollection
Set collection = db.AllDocuments

Set doc= collection.GetFirstDocument

Dim item As New NotesItem(doc, "Subject", "New Inquiry")

Dim item2 As New NotesItem(doc, "Body", "This test was successful") Call doc.Send(True, "aprv345@yahoo.com")

Very simple code actually works beautifully using the Notes Client. However, nothing happens when I use a Web browser to run this agent. The funny thing is that I have many other agents that I can run over the Web because I have unrestricted rights in the Agent Manager.

When I check my error log file, this is what I see:

09/16/2002 10:55:41 AM Addin: Agent 'Test' error message: Notes error: You are not authorized to use the server

Any ideas why this might be happening? I'd truly appreciate your feedback since I've been stuck on this for a while.
You're right, this won't work on the Web. You'll need to create a LotusScript agent using your code. Just call the agent using the $$Return or a location.replace Javascript to call the agent. In order to get at your form, use the Query String on the URL call to passs the document UID. In your script get your document by ID and then use your fields in the same way. Once your script has run, use url refresh to return the user to your application.

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.



  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...