Want to stop the windows service using code?
-
hi, want to stop the running windows service using C#.NET code if there is any exception. service implementation class instance gets created in windows service class and then implmentation class calls the method writeevents when timer elasped. now if there is any exception in the method i want to stop the running service. tried servicecontroller.stop() method. in a seperate class using delegate in the implementation class. As _controller.stop() should stop the service....but in service panel , it shows stopping status for the service..but the service thread keeps running and never stops. please can some one help me with this
-
Answer:
Here's a link to an article dealing with stopping windows services in C# using remoting, source code included. http://www.codeproject.com/csharp/stoppingremotingservice.asp
.NET dev at Yahoo! Answers Visit the source
Related Q & A:
- How to call a web service using HttpWebRequest?Best solution by Stack Overflow
- How can I stop this new Yahoo mobile service?Best solution by Yahoo! Answers
- How do I stop someone else from using my email address fraudulently?Best solution by Yahoo! Answers
- What is the Command to Minimize Windows and Maximize Windows without using the mouse?Best solution by Yahoo! Answers
- What is the Command to Minimize Windows Maximize Windows switch Windows close Windows without using the mouse?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.