Automation object error when a Windows-Service starts a Notes-Agent

Hi,

I have a problem with the notes agent.

1.) When I start the agent in the notes-client it works.

2.) When I start the agent from a code in VB it works.

Code that starts the agent → see below.

3.) When I start the agent from a ASP-file I reveive the error ‘out of memory’.

ASP-Code is analog to the VB-Code below.

After setting admin-rights to the IUSR-user it works.

4.) When I start the agent from a windows-service fails with the error

‘Automation object error’ with the number 207

Code from agent that fails:

Set o = CreateObject(“PXTools.CoXTools”)

Code that starts the agent:

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim agent As NotesAgent

s.Initialize (“password”)

Set db = s.GetDatabase(“server”, “mailfile.nsf”, False)

Set agent = db.GetAgent(“agentname”)

agent.Run

Set agent = Nothing

Set db = Nothing

Which right must I set that the agent can access to the ‘PXTools.CoXTools’ object?

The windows-service can access to ‘PXTools.CoXTools’.

Thanks

Subject: Automation object error when a Windows-Service starts a Notes-Agent

Ah, that infamous OLE Automation Error… Well, I googled around for a while and found following documents that could give You a hint:

http://www.cgoakley.demon.co.uk/prog/oleaut.html

In short; The error could be that the application isn’t correctly installed or has missing/incorrect registry keys. Moreover: You must be sure that the application has been installed under a admin-account.

The application and/or OLE object might use a temp-directory that has been denied access for the Domino server service account.

Some suggests that You change the CreateObject(“PXTools.CoXTools”) into GetObject(…) instead.

But, my guess here is that it is definitly an access-right thing and not an application thing.

not much help, I guess, but at least something to work with…

Subject: RE: Automation object error when a Windows-Service starts a Notes-Agent

I don’t have the login forhttp://www.experts-exchange.com/Applications/Email/Lotus_Notes_Domino/Q_20851723.html

Can You post the answer for the problem?

The application is installed under admin-account. All works fine when a normal windows application calls the agent. The problem exists only when a windows-services calls the agent.

Do You know what is the difference in the rights context transfer between a windows service and a windows application?

I’m using .Net 2.0. Is this a problem?

Subject: RE: Automation object error when a Windows-Service starts a Notes-Agent

You don’t need a login for this - follow the discussion further down on the page.

The discussion thread is little to big to post here.

There is a difference in access rights between windows services and applications, but I’m not 100% sure exactly how they differ.