Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

Its seems like the user account with which you are installing Windows service, don't have permission to make entry in event logs. So what you need to do is to run your command prompt as administrator and install service from there. Check below links

System.Security.SecurityException C# 2.0 windows service[^]

Service application installation fail[^]
 
Share this answer
 
Comments
Purna.N 8-Dec-13 23:55pm    
Thanks... its working

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900