私はC#を使用しています。私はWindows 7を使用してこの時点で私の質問です。私のコードを実行すると、私にエラーなどを与える 193:0xc1エラー、サービスが開始したが、停止した後、1053サービスエラー。 ここに私のコードです。C#のWindowsサービスエラー
public RupdaterService()
{
InitializeComponent();
this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Elapsed);
}
protected override void OnStart (string[] args)
{
timer1.Enabled=true;
this.DBEntry("Service Started");
}
protected override void OnStop()
{
this.timer1.Enabled = false;
this.DBEntry("Service Stopped");
}
private void timer1_Elapsed(object sender,System.Timers.ElapsedEventArgs e)
{
this.DBEntry("Service Running");
}
Here is my App.Config.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5***9" >
<section name="HedefliRUpdater.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5***9" requirePermission="false" />
</sectionGroup>
</configSections>
<system.serviceModel>
</system.serviceModel>
<applicationSettings>
<HedefliRUpdater.Properties.Settings>
<setting name="HedefliRUpdater_srvHedefli_wsrvHermesHedefliMesaj"
serializeAs="String">
<value>http://***.com/hedefli/srvHedefli.asmx</value>
</setting>
</HedefliRUpdater.Properties.Settings>
</applicationSettings>
事前のおかげで、
EventViewerのアプリケーションイベントログを確認します。ほとんどの場合、DBEntryメソッド呼び出しで例外が発生します。 –
それでは、デバッグ以外はどうしたらいいですか? – Arbelac