Displaying errors from window service

student_help

Member
Joined
Aug 8, 2006
Messages
8
Programming Experience
Beginner
Hi

I am created a window service. My problem is there is a error in the code which i am unable to see. I was wondering if there is any way in which I can display the error message in the Application log in the computer manager, or any where on the computer so i can at least see what the problem is

Thanks in advance
Student_help​
 
Hi use Eventlog.writeentry, u find the solution

Hi,

write ur code in the try catch block
try
...
catch ex
Eventlog.WriteEntry (ex.ErrorMessgae)
end try

You will find the error message in the event log Place which is located in the controlPanel-> administrativetools-> eventviewer

thanks,
Naresh.
 
Back
Top