When i am installing the Created Service its not installing please any one Help me.
I am created the windows service using this link....
http://www.aspdotnet-suresh.com/2011/06/creating-windows-service-in-c-or.html[
^]
after that i have installed in command prompt the error is occurred when installing.
Hear is the installation error..
C:\Users\srikanth\Documents\Visual Studio 2010\Projects\WindowsServiceExample1\W
indowsServiceExample1\bin\Debug>installutil WindowsServiceExample1.exe
Microsoft (R) .NET Framework Installation utility Version 4.0.30319.18010
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:\Users\srikanth\Documents\Visual Stud
io 2010\Projects\WindowsServiceExample1\WindowsServiceExample1\bin\Debug\Windows
ServiceExample1.exe assembly's progress.
The file is located at C:\Users\srikanth\Documents\Visual Studio 2010\Projects\W
indowsServiceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.In
stallLog.
Installing assembly 'C:\Users\srikanth\Documents\Visual Studio 2010\Projects\Win
dowsServiceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.exe'
.
Affected parameters are:
logtoconsole =
logfile = C:\Users\srikanth\Documents\Visual Studio 2010\Projects\WindowsServ
iceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.InstallLog
assemblypath = C:\Users\srikanth\Documents\Visual Studio 2010\Projects\Window
sServiceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.exe
Installing service ScheduledService...
Creating EventLog source ScheduledService 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:\Users\srikanth\Documents\Visual Stud
io 2010\Projects\WindowsServiceExample1\WindowsServiceExample1\bin\Debug\Windows
ServiceExample1.exe assembly's progress.
The file is located at C:\Users\srikanth\Documents\Visual Studio 2010\Projects\W
indowsServiceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.In
stallLog.
Rolling back assembly 'C:\Users\srikanth\Documents\Visual Studio 2010\Projects\W
indowsServiceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.ex
e'.
Affected parameters are:
logtoconsole =
logfile = C:\Users\srikanth\Documents\Visual Studio 2010\Projects\WindowsServ
iceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.InstallLog
assemblypath = C:\Users\srikanth\Documents\Visual Studio 2010\Projects\Window
sServiceExample1\WindowsServiceExample1\bin\Debug\WindowsServiceExample1.exe
Restoring event log to previous state for source ScheduledService.
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.
thanks,
purna.n