0
如何在Windows服務中編寫通用錯誤處理程序?我在OnStart方法中嘗試了以下代碼,但它沒有捕獲異常。Windows服務中的錯誤處理
protected override void OnStart(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(UnhandledExceptionTrapper);
this.Start();
}
有什麼我在這裏失蹤?