469,610 Members | 1,649 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

Problem with windows service.

Hi,
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
projects\rashiservice2\service1.cs:line92

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!

Jun 29 '06 #1
2 1736
Do you have the COM object in the Server?

--
Bela Istok
MVP C#
"Niron kag" <Ni******@discussions.microsoft.com> wrote in message
news:A0**********************************@microsof t.com...
Hi,
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
projects\rashiservice2\service1.cs:line92

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!


Jun 29 '06 #2
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.

Brian

Niron kag wrote:
Hi,
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
projects\rashiservice2\service1.cs:line92

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!


Jun 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mahesh Devjibhai Dhola | last post: by
5 posts views Thread by =?Utf-8?B?cnZhbmdlbGRyb3A=?= | last post: by
2 posts views Thread by =?Utf-8?B?aGVsZmk=?= | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.