Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Windows service startUp error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew - 11 Mar 2008 17:56 GMT
Hi all,

My question consists of 2 parts:

1) I have installed my windows service [by right-click on Setup.exe in
SolutionExplorer, then Install ... ] onto a folder on my desktop. When I
click on the MyNewService.exe file, I got the following error message:

" Cannot start service from the command line or a debugger. A Windows
Service must first be installed (using installutil.exe) and then started with
the ServerExplorer, Windows Services Administrative tool or the NET START
command. "

2) Is the problem because I need to install using "installutil /i
C:\MyNewService3.exe" ?
I tried that and i got the error message:

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

Any advice on understanding what this message says ?
Thanks.

regards,
Andrew
Phil Wilson - 12 Mar 2008 00:13 GMT
Well you definitely need to get the service installed properly, yes.
InstallUtil is generally used (although setup projects of various types may
use the more conventional installation techniques).

The exception indicates that your assembly has a dependency that's missing,
although the fact that it's called Documents seems odd to me, unless of
course you actually have a reference to an assembly of that name, and it is
unavailable.

Have you by any chance added a CustomActionData property that's being passed
into the Install method of your installer class? I've seen some issues in
this area.
Signature

Phil Wilson
[MVP Windows Installer]

> Hi all,
>
[quoted text clipped - 24 lines]
> regards,
> Andrew
barker7@yahoo.com - 12 Mar 2008 21:24 GMT
> " Cannot start service from the command line or a debugger. A Windows
> Service must first be installed (using installutil.exe) and then started with
> the ServerExplorer, Windows Services Administrative tool or the NET START
> command. "

If it is a windows service then you must start it from the services
control panel

If you want to make it optionally run from a console window, you need
to add some logic in your main so that ServiceBase.Run is not called.

Mitch

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.