Problem with windows service.



I built a windows service and I added it references to COM objects which I
use in my code.
The service work well when I install it in my pc (windows 2000).
When I install the project in other pc (Server – windows server 2003) it
returns me an error:
“Service on local computer started and then stopped. Some services stop
automatically if they have no work to doâ€
I checked the error in Google and the best advice there was to check the
event viewer and see what happened.
In the event viewer I get the following error:
Service cannot be started. System.Runtime.InteropServices.COMException
(0x80040154): COM object with CLSID {632F4591-AA62-4219-8FB6-22BCF5F69469} is
either not valid or not registered.
at MyService2.Service55.StartReplication() in e:\documents and
settings\shai_sh\my documents\visual studio
projects\rashiservice2\service1.cs:line 125 at
MyService2.Service55.OnStart(String[] args) in e:\documents and
settings\shai_sh\my documents\visual studio

In line 125 I use in the first time the COM object.
Line 92 is the second line in the OnStart event and it calls a function in
line 124 (the first row of the function is 125).

Is there any reason that I will have a problem to install windows service on
a server?
Or ant other thing?
If you can help I will really appreciate it.
Thanks in advance!

Brian Gideon

This is a pretty good indication that the COM object is not installed
on the server. If you know what dll contains the object and if you can
find the dll on the server you might try registering it with regsvr32.


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