Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# install service
Hi anybody
I wrote a windows service by visual studio 2010 .
I installed and tested it on my laptop by InstallUtil.exe(from windows\.net\ framework 2 folder).
But when installing it on a windows server 2008 it raise this error:
Please note I have administrator privileged on this server .
C:\c:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe
-i c:\FileManitor\AspcFileManitor.exe
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
Copyright (c) Microsoft Corporation.  All rights reserved.
 
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the c:\FileManitor\AspcFileManitor.exe asse
mbly's progress.
The file is located at c:\FileManitor\AspcFileManitor.InstallLog.
Installing assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Installing service ASPC File Monitor...
Creating EventLog source ASPC File Monitor in log Application...
An exception occurred during the Install phase.
System.Security.SecurityException: The source was not found, but some or all eve
nt logs could not be searched.  Inaccessible logs: Security.
The Rollback phase of the installation is beginning.
See the contents of the log file for the c:\FileManitor\AspcFileManitor.exe asse
mbly's progress.
The file is located at c:\FileManitor\AspcFileManitor.InstallLog.
Rolling back assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Restoring event log to previous state for source ASPC File Monitor.
An exception occurred during the Rollback phase of the System.Diagnostics.EventL
ogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all eve
nt logs could not be searched.  Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This except
ion will be ignored and the rollback will continue. However, the machine might n
ot fully revert to its initial state after the rollback is complete.
The Rollback phase completed successfully.
The transacted install has completed.
The installation failed, and the rollback has been performed.
and here is the log file:
Installing assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Installing service ASPC File Monitor...
Creating EventLog source ASPC File Monitor in log Application...
Rolling back assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Restoring event log to previous state for source ASPC File Monitor.
An exception occurred during the Rollback phase of the System.Diagnostics.EventLogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.
 

Posted 19-Jul-11 19:11pm
sepel1.1K
Edited 19-Jul-11 19:55pm
v2
Comments
digimanus at 20-Jul-11 3:29am
   
you use the installutil in the CMD command (DOS Box)? Did you start the CMD command with run as administrator option?
SAKryukov at 20-Jul-11 3:37am
   
What are you talking about? There is not such thing as "DOS Box" (anymore). This is no a "command" either, just a regular application CMD.EXE.
--SA
digimanus at 20-Jul-11 3:45am
   
this is how most people still see it. A DOSBox whether it exists or not anymore. The point was that he had to run it as administrator.
SAKryukov at 20-Jul-11 3:54am
   
Sure, a good point. But why repeat wrong terms, only to further confuse people?
--SA
digimanus at 20-Jul-11 3:55am
   
maybe it is the new term that confuses people ;)
sepel at 20-Jul-11 3:41am
   
Thank you.You are corect!. It was solved
Ramya H J at 7-Oct-13 15:59pm
   
thanks! it helped me
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It solved !
However I has administrator privileged , I should run Command prompt windows With "As administrate" option !
I found this link:Service application installation fail[^]
  Permalink  
Comments
Ramalinga Koushik at 20-Jul-11 3:47am
   
Perfect. +5.
Ramalinga Koushik at 20-Jul-11 3:48am
   
Bookmarked it for future reference.
Sandeep1686 at 11-Jun-13 6:53am
   
Thanks. Your solution helped me.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

An additional variation.
I find it easier to copy installutil.exe,InstallUtilLib.dll and InstallUtil.exe.config to the target directory.
Then navigate the commandprompt to the target directory and run installutil -i Target.exe
I get sick of mistyping long directory paths and having installutil complain it can't find the target file.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid