How to find out if a service present in different machine has been stopped or started
Use ServiceController Class present in System.ServiceProcess namespace to determine the status of the service. Have a timer in the application which is monitoring the service. The timer should poll service to determine its status.
ServiceController c = new ServiceController("<servicename>", "<machine name>");
Does windows service pick up any changes made to app.config when its running ?
No. The service needs to be restarted to pick up any new changes made to the config file.
Debug a windows service
Below are the three methods
1.Create a new test class. Then call the functions from test class.
2.Add a line System.Diagnostics.Debugger.Break(); wherever you want to debug.At runtime a new instance will be created and debugging can be carried out in separate windows.
3.Please refer
http://aspalliance.com/1316_Working_with_Windows_Service_Using_Visual_Studio_2005.6
How to install a windows service
Go to visual studio command prompt. Navigate to path where the exe that you want to install is present.
To install, type
installutil projectname.exe
To uninstall, type
installutil /u projectname.exe
Use ServiceController Class present in System.ServiceProcess namespace to determine the status of the service. Have a timer in the application which is monitoring the service. The timer should poll service to determine its status.
ServiceController c = new ServiceController("<servicename>", "<machine name>");
No. The service needs to be restarted to pick up any new changes made to the config file.
Debug a windows service
Below are the three methods
1.Create a new test class. Then call the functions from test class.
2.Add a line System.Diagnostics.Debugger.Break(); wherever you want to debug.At runtime a new instance will be created and debugging can be carried out in separate windows.
3.Please refer
http://aspalliance.com/1316_Working_with_Windows_Service_Using_Visual_Studio_2005.6
How to install a windows service
Go to visual studio command prompt. Navigate to path where the exe that you want to install is present.
To install, type
installutil projectname.exe
To uninstall, type
installutil /u projectname.exe
Thanks for sharing this post.
ReplyDeleteInterview Questions
Very cool. Thanks.
ReplyDeleteHey Nice Post, Keep Updating more question and answers
ReplyDeleteAll It Technologies
That is really Good information thanks a lto
ReplyDeleteThank you for imparting such an informative content. I like the way you publish such an useful post which may help many needful. Home tutor services in Delhi are also provided by TheTuitionTeacher in Lucknow
ReplyDeleteHome Tutors in Lucknow | Home Tuition Service
Very nice Thanks for sharing
ReplyDelete.Net Online Course
Great post! Excel Full Course offers complete training from basics to advanced Excel skills with practical learning.excel full course
ReplyDelete