Run as a service

Run as a service

Postby BFleming » Fri Jan 25, 2013 6:15 am

I'm trying to get the Windows module to run as a service. It chokes on the login. Does anyone have a template or sample working as a service?
BFleming
Participant
 
Posts: 1
Joined: Thu Jan 24, 2013 2:07 pm

Re: Run as a service

Postby David » Tue Feb 05, 2013 8:06 am

BFleming wrote:I'm trying to get the Windows module to run as a service. It chokes on the login. Does anyone have a template or sample working as a service?

The Windows module? What module?

In most cases I have seen the problem is incorrect full assignment of domain and name in the string for User.

What KC version? I guess you use linked AD/KC User Profiles...
If you make it idiot-proof, someone will make a better idiot.
User avatar
David
Participant
 
Posts: 1501
Joined: Wed Dec 07, 2005 4:08 am

Re: Run as a service

Postby dklingman » Fri Mar 01, 2013 1:22 pm

I am having a similar problem. We had a service that's been running for years now and was programmed against 7.5. The client is going to 10.0 now and I'm trying to test to ensure the code still works.

In my project I have references to Kacui, Kofax.Kacui.Interop & Kofax.AscentCaputreModule.Interop
In my code I have the following

Code: Select all
mKfxImportLogin = New AscentCaptureModule.ImportLogin


This is where it is failing and not making it any further. The exception that I'm getting is the following:
System.Runtime.InteropServices.COMException = {"Retrieving the COM class factory for component with CLSID {F3A2E2DD-5169-42B3-AF0E-3B3DAEB25CF1} failed due to the following error: 80040154."}
dklingman
Participant
 
Posts: 57
Joined: Thu Oct 19, 2006 10:18 am

Re: Run as a service

Postby russell@centuryc.com » Mon Mar 04, 2013 11:27 am

When I run into problems running as a service, I try to log in as that service user and then run the program as a user.

Some things to watch out for:

Services don't see mapped drives.
Make sure the Windows login for the service as rights to what's needed to run.

The last item is that some things, like COM objects may have rights for "Interactive users". Those will drive you batty as they will work when you login as the service, but not when you launch the program as a service.
Russell
russell@centuryc.com
Participant
 
Posts: 3233
Joined: Wed May 17, 2006 12:53 pm
Location: USA

Re: Run as a service

Postby nicola$ » Tue Mar 26, 2013 3:19 am

Hi,

contacted Kofax support recently to have a sample of custom module running as a service. Maybe this might help you :
An example of a Custom Module, including source code, that can also operate as a Windows Service is available through the "Kofax Capture 8 Color To Bitonal Image Converter Module".

The "Kofax Capture 8 Color To Bitonal Image Converter Module" is located on the Kofax Capture 8.0 downloads web page under the section "Utilities, Samples, Etc."

ftp://ftp.kofax.com/pub/support/capture ... verter.zip
nicola$
Participant
 
Posts: 38
Joined: Tue Jun 02, 2009 8:05 am


Return to Custom Modules General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests