473,545 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Serv ice55.StartRepl ication() in e:\documents and
settings\shai_s h\my documents\visua l studio
projects\rashis ervice2\service 1.cs:line 125 at
MyService2.Serv ice55.OnStart(S tring[] args) in e:\documents and
settings\shai_s h\my documents\visua l studio
projects\rashis ervice2\service 1.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 1859
Do you have the COM object in the Server?

--
Bela Istok
MVP C#
"Niron kag" <Ni******@discu ssions.microsof t.com> wrote in message
news:A0******** *************** ***********@mic rosoft.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.Serv ice55.StartRepl ication() in e:\documents and
settings\shai_s h\my documents\visua l studio
projects\rashis ervice2\service 1.cs:line 125 at
MyService2.Serv ice55.OnStart(S tring[] args) in e:\documents and
settings\shai_s h\my documents\visua l studio
projects\rashis ervice2\service 1.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.Serv ice55.StartRepl ication() in e:\documents and
settings\shai_s h\my documents\visua l studio
projects\rashis ervice2\service 1.cs:line 125 at
MyService2.Serv ice55.OnStart(S tring[] args) in e:\documents and
settings\shai_s h\my documents\visua l studio
projects\rashis ervice2\service 1.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3489
by: David | last post by:
I've written a small windows service, and I'm having a problem that I'm spending a lot more time on than I'd like. If anyone has experienced this problem and has any hints or solutions; they would be appreciated. Simply leaving the threadMain() method if something unexpected occurs during thread execution leaves the thread in a...
1
3248
by: bob | last post by:
I have created a simple Windows service in VB.Net which installs fine using InstallUtil.exe to install it to, for example "c:\test", or "c:\Windows\YellowBanana", but if I install it to "c:\Program Files\Test" it installs ok but will not start (no useful error message is given other than the usual annoying suggestion about having sufficient...
2
2566
by: epaetz | last post by:
I'm getting Not associated with a trusted SQL Server connection errors on a .Net windows service I wrote, when it's running on my application server. It's not a problem with mixed mode security. I'm set for mixed mode and I've been running the service on the app server for over a month with no problem. My database is running on a second...
1
4145
by: Simon Verona | last post by:
Hope somebody can help. I have a web service written in vb.net which works fine localling on my Windows XP Pro development machine without a problem. I have deployed in onto a Windows Server 2003 machine - by copying the whole project onto the server, and creating a virtual directory in IIS to point to it. On the Windows Server console...
8
55669
by: Kevin D. | last post by:
Please note, I already posted this on the MySQL official forum, but received no response. I thought I'd try again in another location. My apologies to anyone reading this twice... Despite everything I've tried, I cannot get MySQL to start as a Windows service. However, I AM able to get it started via the mysqld-nt --console command. Here...
1
1373
by: PankajLohani | last post by:
hello, This is very challenging problem for me. basically my windows service monitor the application when my application hang due any reason then my service kill that process and application .Then restart the process and application again. So for all this I made the service. Well now come on problem, plz come on controlpannel > Administrator...
1
1948
by: Mahesh Devjibhai Dhola | last post by:
Hi, Scenario: The webservice was developed on windows 2000 Pro and deployed previously on windows XP pro for testing. We have tested for many days. The client for that service was 30+ and accessing the webservice each min. It was working 100% fine. Problem: But now in actual deployment, we have deployed webservice in Win Server 2003 and we...
5
8956
by: =?Utf-8?B?cnZhbmdlbGRyb3A=?= | last post by:
Hello, I have a problem with our OnlineBackupService.exe. This is a Windows Service which is built in .Net 1.1 and basically grabs files from the file system and will try to upload them using WebServices. The service is installed by default using LocalSystem account. The exact problem is that sometimes this service is not allowed to...
2
1929
by: =?Utf-8?B?aGVsZmk=?= | last post by:
Hi all, I have replied with my own questions to an older post entry but after a while I thought it's better to start a new thread based on the previous one. Perhaps with the new thread I will catch more eyes and find someone who had the same problem and solved it or has more information about it. This is a summary of my problem:
4
3151
by: Dave Burns | last post by:
I am self hosting a Web Service in a Windows service. I am trying to start the service using the NT AUTHORITY\NetworkService account. I get a NullReferenceException on ServiceHost.Open() in the ServiceBase.OnStart() method. SCM throws a 1067 error as well. I get the same problem with NT AUTHORITY\LocalService. When I use the LocalSystem...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7419
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5326
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.