Issue 1: "System.Security.SecurityException: The source was not found, but some or all of the event logs could not be searched." Inaccessible logs: Security. ”
The transaction installation is running.
The installation phase of the installation is beginning.
View the contents of the log file to obtain ... \bin\debug\service2.exe the progress of the Assembly.
The file is located in ... \bin\debug\service2.installlog.
An exception occurred during the install phase.
System.Security.SecurityException: The source was not found, but some or all of the event logs could not be searched. Inaccessible logs: Security.
The rollback phase of the installation is starting.
View the contents of the log file to obtain ... \bin\debug\service2.exe the progress of the Assembly.
The file is located in ... \bin\debug\service2.installlog.
The rollback phase has completed successfully.
The transaction installation has completed.
Workaround 1:
ServiceProcessInstaller1 in the account attribute, set to LocalSystem
Workaround 2:
Write the installed command as a bat file, and note the path, right-click, "Run as Administrator" (more than now in the Win7 system)
C # Developing Windows Services Services--a workaround for service installation failures