Installation failure of Windows Service

时间:2016-10-20 12:56:10

标签: c# .net windows windows-services

I have made a Windows Service, when I tried to install it, I get this message :

D:\workspace\TestWindowsService\TestWindowsService\bin\Debug>InstallUtil.exe TestWindowsService.exe Microsoft (R) .NET Framework Installation utility Version 4.6.1586.0 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 D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe assembly's progress. The file is located at D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog. Installing assembly 'D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe'. Affected parameters are: logtoconsole = logfile = D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog assemblypath = D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe Installing service Scheduler... Creating EventLog source Scheduler in log Application...

An exception occurred during the Install phase. System.Security.SecurityException: The source was not found, but some or all event 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 D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe assembly's progress. The file is located at D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog. Rolling back assembly 'D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe'. Affected parameters are: logtoconsole = logfile = D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog assemblypath = D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe Restoring event log to previous state for source Scheduler. 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.

The Rollback phase completed successfully.

The transacted install has completed. The installation failed, and the rollback has been performed.

I couldn't find what to do from this message. How can I fix my problem? Thanks.

0 个答案:

没有答案