C#で簡単なWindowsServiceのプログラムを作成しようとしています。
しかし、インストール段階でエラーが出て、それが解決出来てない状況です。
■インストールの実行(開発者コマンドプロンプト)
installutil WindowsService01.exe
■エラー抜粋
System.Security.SecurityException: ソースが見つかりませんでしたが、いくつかまたはすべてのログを検索できませんでした。アクセス不可能なログ: Security
■ソースは以下です
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; namespace WindowsService1 { public partial class Service01 : ServiceBase { public Service01() { InitializeComponent(); } protected override void OnStart(string[] args) { this.EventLog.WriteEntry(String.Format("OnStart:")); } protected override void OnStop() { this.EventLog.WriteEntry(String.Format("OnStop:")); } } }
とにかく、WindowsServiceの登録までこぎつけたいです。
ご教示お願い出来ますでしょうか。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/10 15:13
2017/05/10 15:16
2017/05/10 15:29
2017/05/11 12:24