Execute web agent to create lotus account!

I have a button on my form, this button execute a LotusScript agent.

This agent creates a Lotus account.

I’ve tested this agent in the client, and it works very well. Now when I run it via the button that is in the web document. The agent does not run!

I have already check “Run as web user” on the Security tab to run the agent using the browser login name

is what I have to configure some thing to run my web agent?

Tkx

Subject: I’m guessing it’s your code

but you’ll need to post it for anyone to know for sure.

Subject: Question

Does it not run or errors out? Did you sign the agents. Do they have rights to run on the server (check server doc). Does the id that signed/is running the agent have create rights to the nab?

Did you check the logs to see if there is a error message.

Subject: Are you using…

… any UI code in the agent?

Subject: Execute web agent to create lotus account!!

i don’t have any ui in my web agent, it has all permission to execute in web.

My web agent (Creation) start bu this code:

Sub Initialize

Print _

|<html>

<script>alert('(Creation)')

</script>

</html>|



On Error Goto ErrorHandlerMain



InitVars

....

InitVars is a sub in biblio de script.

When i verified in log.nsf, i found this message:

HTTP Server: Agent message: Object variable not set

and i’m sure that my code is correct!!

Any ideas please.

Subject: Add error handling code

then you can output the line number for your error, then you can drill down. I think you will find your error is occurring somewhere different to what you pasted.

HTTP Server: Agent message: Object variable not set

Subject: Could not open the ID file when i want to create lotus account

Hi,

I added error handling code, and i found this message:

HTTP Web Server: Document de conception introuvable - Erreur :Erreur Notes : Could not open the ID file, ligne : 58

When, i verified in my code, my web agent is stopped here in this line :

Call reg.RegisterNewUser( _

UCase(nom), _	' last name

"", _		' file to be created

mailServer, _	' mail server

prenom, _ 	' first name

"", _			' middle initial

certIdPassword, _		 ' certifier password

"", _					' location field

"", _					' comment field

mailFile,  _	 ' mail file

"", _						' forwarding domain

userIdPassword)			' user password

i don’t know what i must do it to resolve this problem “Could not open the ID file”?!

Subject: Check this

in reg.CertifierIDFile you need to specify the location on the server where the certifier id file is located not just the file name

Subject: CerifedIDFile

in the help, i found:Before calling the method “RegisterNewUser”, set CertifierIDFile, Expiration (defaults to 2 years from now), IDType, and MinPasswordLength.

Set UpdateAddressBook True to add a Server record to the Domino Directory. Set StoreIDInAddressBook True to attach the ID to the Domino Directory record. These operations can be performed separately with AddUserToAddressBook.

So, i set CertifierIDFile by this :

With reg

'=== certificate

  .CertifierIDFile = certIdFilePath

and i have certid file in my machine in local ( Z:\cert.id).

i must add the server?!

Subject: Yes

The agent is running on the server and looking for the file on the z drive. You need to put it in a directory/drive that the server has access to.

Subject: Object variable not set

I put the certifier id file in a folder on the server.

Now, I run my agent to create a Lotus account. I use the method reg.RegisterNewUser Call (…) to create it.

I can create the document in the names.nsf user base, and I do the update of this document. But when I check if the mail database is created, I don’t found it.

I use this line to check if the pnom.nsf mail file exists or not

Set dbmail = session.Getdatabase (MailServer MailFile, False)

But then I found that the object is null. And when I check manually I can’t find the mail database!

Ideas to solve this problem?

Subject: question

Is the mail file being created or is it that you dont have access to it. IF the later put yourself in a acl group and add that group into the acl of the mail template with around the name. if the mail file is not getting created check your the admin4 db to see if there is a rquest to create the db, also check you code that you set create db on in the reg request

Subject: Error

How about in the error handler you print out the error line and error number and error message.

Are you sure the agent is signed correctly with proper rights. Is running on behalf of someone?