Windows Service

A

apondu

Hi,

I am trying to write a windows service using the option that is present
..Net. I am using the window service project. I have written a simple
window service and even created a installer for tht by using the option
present in widow service. When i try to execute the window service
using installutil.exe i get this exception

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name DemoService,
or one of its
dependencies, was not found..


Can anyone tell me wht's the problem and wht is the solution for tht
Thanks in advance for the suggestion.

Regards,
Govardhan
 
W

Willy Denoyette [MVP]

| Hi,
|
| I am trying to write a windows service using the option that is present
| .Net. I am using the window service project. I have written a simple
| window service and even created a installer for tht by using the option
| present in widow service. When i try to execute the window service
| using installutil.exe i get this exception
|
| Exception occurred while initializing the installation:
| System.IO.FileNotFoundException: File or assembly name DemoService,
| or one of its
| dependencies, was not found..
|
|
| Can anyone tell me wht's the problem and wht is the solution for tht
| Thanks in advance for the suggestion.
|
| Regards,
| Govardhan
|
Demoservice.exe?

Willy.
 
W

Willy Denoyette [MVP]

And you run InstallUtil demoserver.exe ??

Willy.

| Hi Willy,
|
| Ya its name is DemoService.exe
|
 
A

apondu

ya i run this command and whn i do this i get this exception which i
had mentioned earlier

Govardhan
 
A

apondu

ya i run this command and whn i do this i get this exception which i
had mentioned earlier

Govardhan
 
A

apondu

ya i run this command and whn i do this i get this exception which i
had mentioned earlier

Govardhan
 
G

Guest

Govardhan,
It needs to be installutil /i demoservice.exe (with the ".exe" on the end).

Also, it depends where you are running installutil.exe from. if you are
running it from withing the .NET Framework directory, you need the FULL PATH
to your demoservice.exe, unless you are running it from the same folder as
demoservice.exe and have your path variables to the .NET Framwork directory
set in that command prompt.
Peter
 
A

apondu

Hi Peter,

Thanks for the response.

I just did wht u asked me to do and executed the service the way u
asked me to do. But i get the following exception. I have pasted the
whole output i got on the console. Can u please let me know wht is the
problem and how can i solve it

---------------------------------------------------------------------------
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the c:\gova_examples\window
services\demose
rvice\bin\debug\demoservice.exe assembly's progress.
The file is located at c:\gova_examples\window
services\demoservice\bin\debug\de
moservice.InstallLog.
Installing assembly 'c:\gova_examples\window
services\demoservice\bin\debug\demo
service.exe'.
Affected parameters are:
i =
logfile = c:\gova_examples\window
services\demoservice\bin\debug\demoservice.
InstallLog
assemblypath = c:\gova_examples\window
services\demoservice\bin\debug\demoser
vice.exe
Hello
Installing service DemoService...
Service DemoService has been successfully installed.
Creating EventLog source DemoService in log Application...
Installing service DemoService...
Creating EventLog source DemoService in log Application...

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The specified service already
exists

The Rollback phase of the installation is beginning.
See the contents of the log file for the c:\gova_examples\window
services\demose
rvice\bin\debug\demoservice.exe assembly's progress.
The file is located at c:\gova_examples\window
services\demoservice\bin\debug\de
moservice.InstallLog.
Rolling back assembly 'c:\gova_examples\window
services\demoservice\bin\debug\de
moservice.exe'.
Affected parameters are:
i =
logfile = c:\gova_examples\window
services\demoservice\bin\debug\demoservice.
InstallLog
assemblypath = c:\gova_examples\window
services\demoservice\bin\debug\demoser
vice.exe
Hello
Restoring event log to previous state for source DemoService.
Restoring event log to previous state for source DemoService.
Service DemoService is being removed from the system...
Service DemoService was successfully removed from the system.

The Rollback phase completed successfully.

The transacted install has completed.
The installation failed, and the rollback has been performed.

------------------------------------------------------------------------------------------------------

It would be very helpful if u can help me out in this.

Thanks for the help

Regards,
Govardhan
 
A

apondu

Hi Peter,

I tried to uninstall the window service with /u option for the
installutil command but even thn there was a same exception. Whn i try
to manually find the windows service in the operating system's services
i couldn't find it. Wht else could be the reason for the exception.
Can u let me know.

Thank You

Govardhan
 

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

Top