Windows Services - COM

T

takbax

I have a .net windows service which calls into a PowerBuilder COM object to
format some data. The windows service does emailing, logging to text file,
logging to eventlogs etc through system.diagnostics as well as calls web
services.

Everything works great when running my windows service under a domain\user
account. However, when running under local system or local administrator it
fails with when attempting to instanciate the COM object with...

10:28:58 AM ####ERROR: Order #59293
Failed-Reason:System.IO.FileNotFoundException: The specified module could not
be found.

I need to understand why this is failing because ideally i need to run under
a local system account not a domain account.

Please help...
 
C

Chris Rolon

Try running the FusLogVw utility. This will tell you what module it could
not find to load. In addition, handle the exception in the service and log
the error. This should give you the information that you need to understand
what is happening.
 
T

takbax

I am unable to get fuslogvw to show me anything for my windows service while
running as a service. I'll keep trying. However, in the mean time here it
the specific error details

{System.IO.FileNotFoundException}
[System.IO.FileNotFoundException]: {System.IO.FileNotFoundException}
HelpLink: Nothing
InnerException: Nothing
Message: "The specified module could not be found."
Source: "mscorlib"
StackTrace: " at System.RuntimeType.CreateInstanceImpl(Boolean
publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Tessitura.TicketFormatter.Engine.GetFormattedTicket(DataSet ds) in
C:\aWork\Projects\TessituraAPI_Version5.0\TessituraTicketFormatter\Engine.vb:line 82"
TargetSite: {System.Reflection.RuntimeMethodInfo}

Which occurs at the createinstance line of code...
oType = Type.GetTypeFromProgID("PB90.n_ticketformat")
oCOMTicket = Activator.CreateInstance(oType)

PB90.n_ticketformat has been registered using regsvr32 and is not referenced
in my vb.net class library. the class library is called from my windows
service.

Additional facts:
*It only works when running under domain\user and does not use any network
users.
*fails under localSystem,localService,NetworkService,Admin
*tried installed class library into the gac. no luck
*succeeds running in debug mode but not when running as windows service
attaching to process then debugging
*vb.net class library takes in a dataset coverts it to an adodb recordset to
pass to the powerbuild COM. Powerbuilder formats data, that's it. It then
returns an adodb recordset and translates it back into a dataset.
*the windows service using system.diagnostics, mail, and web services

Thanks,

Chris Rolon said:
Try running the FusLogVw utility. This will tell you what module it could
not find to load. In addition, handle the exception in the service and log
the error. This should give you the information that you need to understand
what is happening.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top