Click here to Skip to main content
15,906,708 members
Home / Discussions / C#
   

C#

 
Question[2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 4:39
professionalVimalsoft(Pty) Ltd23-Oct-08 4:39 
AnswerRe: [2.0] Service does not Do its Job Pin
Wendelius23-Oct-08 4:48
mentorWendelius23-Oct-08 4:48 
Killing a process using a service sounds a little bit odd/risky.

However, if there's no error, the first thing I would do is to check that procList.Length is at least 1 when you expect to find a process. Writing to a log file would be an easy way since service may not communicate with desktop.

Also surround your code in OnStart method using try block and in catch write any problems to the same log file.

The need to optimize rises from a bad design.

My articles[^]

GeneralRe: [2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 20:39
professionalVimalsoft(Pty) Ltd23-Oct-08 20:39 
AnswerRe: [2.0] Service does not Do its Job Pin
Mark Salsbery23-Oct-08 7:57
Mark Salsbery23-Oct-08 7:57 
GeneralRe: [2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 19:40
professionalVimalsoft(Pty) Ltd23-Oct-08 19:40 
GeneralRe: [RESOLVED] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd24-Oct-08 1:50
professionalVimalsoft(Pty) Ltd24-Oct-08 1:50 
GeneralRe: [RESOLVED] Service does not Do its Job Pin
Mark Salsbery24-Oct-08 4:32
Mark Salsbery24-Oct-08 4:32 
QuestionOracle... Pin
Stephen Lintott23-Oct-08 3:59
Stephen Lintott23-Oct-08 3:59 
QuestionRe: Oracle... Pin
led mike23-Oct-08 4:34
led mike23-Oct-08 4:34 
AnswerRe: Oracle... Pin
Wendelius23-Oct-08 4:51
mentorWendelius23-Oct-08 4:51 
GeneralRe: Oracle... Pin
Stephen Lintott23-Oct-08 5:02
Stephen Lintott23-Oct-08 5:02 
GeneralRe: Oracle... Pin
Wendelius23-Oct-08 7:30
mentorWendelius23-Oct-08 7:30 
QuestionSAPI 5.1 for speech recognition_SR engine threashold Pin
Member 398136623-Oct-08 3:35
Member 398136623-Oct-08 3:35 
QuestionDelegates Pin
geekfromindia23-Oct-08 3:32
geekfromindia23-Oct-08 3:32 
AnswerRe: Delegates Pin
Ennis Ray Lynch, Jr.23-Oct-08 3:45
Ennis Ray Lynch, Jr.23-Oct-08 3:45 
QuestionHow to pass a groupbox from a class to other class Pin
TALHAKOSEN23-Oct-08 3:15
TALHAKOSEN23-Oct-08 3:15 
AnswerRe: How to pass a groupbox from a class to other class Pin
Tom Deketelaere23-Oct-08 3:28
professionalTom Deketelaere23-Oct-08 3:28 
GeneralRe: How to pass a groupbox from a class to other class Pin
TALHAKOSEN23-Oct-08 19:43
TALHAKOSEN23-Oct-08 19:43 
QuestionUploading a file to an FTP server using C# Pin
srinivaskonijeti23-Oct-08 3:10
srinivaskonijeti23-Oct-08 3:10 
QuestionRe: Uploading a file to an FTP server using C# Pin
josephbhaskar23-Oct-08 3:54
josephbhaskar23-Oct-08 3:54 
QuestionPersonlisation and Shared View Pin
Adeel Shahid23-Oct-08 3:02
Adeel Shahid23-Oct-08 3:02 
NewsC#/CLR-based Stored Procedures in SQL Server 2005 (in the SQL Forum) Pin
James R. Twine23-Oct-08 2:36
James R. Twine23-Oct-08 2:36 
QuestionHow to get SelectedValue from Text ,,, Combobox ? Pin
kindman_nb23-Oct-08 2:31
kindman_nb23-Oct-08 2:31 
QuestionConvert it to Windows Service Pin
Vimalsoft(Pty) Ltd23-Oct-08 2:21
professionalVimalsoft(Pty) Ltd23-Oct-08 2:21 
AnswerRe: Convert it to Windows Service Pin
Simon P Stevens23-Oct-08 2:39
Simon P Stevens23-Oct-08 2:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.