Sunday, April 20, 2014

Hello, may I ask when a service uses service.Stop will stop there after his own way to use service.

The Will Will Web | via C # how to start, stop, restart Windows Services
try {/ / Known Service Name string m_ServiceName = "Service1"; / / build ServiceController object instance ServiceController service = new ServiceController (m_ServiceName); / / set a Timeout time, if more than 30 seconds to start unsuccessful on failed TimeSpan! timeout = TimeSpan.FromMilliseconds bobble jug (1000 * 30); / / start the service service.Start (); / / Set the service bobble jug must wait timeout time to change the status of "Started (Running)" state service.WaitForStatus (ServiceControllerStatus bobble jug . Running, timeout);} catch {System.Windows.Forms.MessageBox.Show ("Service can not start, please check the relevant settings!");}
try {string m_ServiceName = "Service1"; ServiceController bobble jug service = new ServiceController (m_ServiceName); / / set a Timeout time, if more than 60 seconds to start unsuccessful on failed TimeSpan timeout = TimeSpan.FromMilliseconds (1000 * 60);! / / If the service is not "disabled" state, bobble jug before it stops working, otherwise bobble jug it will lead to Exception if {service.Stop () (service.Status = ServiceControllerStatus.Stopped && service.Status = ServiceControllerStatus.StopPending!!); service. WaitForStatus (ServiceControllerStatus.Stopped, timeout);}} catch (Exception ex) {/ / If you can not disable the service will trigger Exception, it will uninstall automatically interrupted bobble jug throw new InstallException bobble jug ("service can not be disabled, you can first use "Task Manager" bobble jug will end Service1.exe program, then uninstall ");}
五月 9.2009 02:21
Hello, may I ask when a service uses service.Stop will stop there after his own way to use service.Start start services? Because the service is stopped, he seems to do service.Start no longer be used after service.Stop, Services bobble jug will enter StopPending state at this time and can not start the service, there will be an error: Unable to start service would presumably have to wait until the service is completely stopped before entering the Stopped state there are ways to re-start the service, but the service is stopped, it will not continue to perform Is there a method to program the answer? Thank you.
Add comment Name * Required Please choose bobble jug another name E-mail * (you enter the Email will not be displayed on the website) Required Please enter a valid E-mail Please enter the correct website URL Country [Not specified] Afghanistan Albania Algeria Argentina Armenia Australia Austria Azerbaijan Bahrain bobble jug Bangladesh Belarus Belgium Belize Bolivarian Republic of Venezuela Bolivia Bosnia and Herzegovina Botswana Brazil Brunei Darussalam Bulgaria Cambodia Canada Caribbean Chile China Colombia Costa Rica Croatia Czech Republic Denmark Dominican Republic Ecuador Egypt El Salvador Eritrea Estonia Ethiopia Faroe Islands Finland France Georgia Germany Greece Greenland Guatemala Honduras Hong Kong SAR Hungary Iceland India Indonesia Iran Iraq Ireland Israel Italy Jamaica Japan Jordan Kazakhstan Kenya Korea Kuwait Kyrgyzstan Lao PDR Latvia Lebanon Libya Liechtenstein Lithuania Luxembourg Macao SAR Macedonia (Former Yugoslav bobble jug Republic of Macedonia) Malaysia Maldives Malta Mexico Mongolia Montenegro Morocco Nepal Netherlands New Zealand Nicaragua Nigeria Norway Oman Pakistan Panama Paraguay Peru Philippines bobble jug Poland Portugal Principality of Monaco Puerto Rico Qatar Romania Russia Rwanda Saudi Arabia bobble jug Senegal Serbia Serbia and Montenegro (Former) Singapore Slovakia Slovenia South Africa Spain Sri Lanka Sweden bobble jug Switzerland Syria Taiwan Tajikistan Thailand Trinidad and Tobago Tunisia Turkey Turkmenistan UAE Ukraine United Kingdom United States Uruguay Uzbekistan Vietnam Yemen Zimbabwe biu quote Required reviews online preview article category. Net Accessibility AngularJS ASP.NET ASP.NET Identity ASP.NET MVC ASP.NET Web API C # CSS Entity Framework Git HTML5 IIS JavaScript LINQ Linux MySQL Office Office 365 Oracle PHP Scrum Security SQL Server Subversion System Center TFS TFS2010 Tips Unit Testing Usability VBA Visual Basic Visual Studio Visual Studio 11 Visual Studio 2012 Visual Studio 2013 VS2010 Tips Web WebMatrix Windows 8 Windows Azure Windows Phone 7 introduces good Sharing experience with multi-tool system management front-end engineering Odd News Research Network project management team to manage all Articles All Articles 2014 April (5) March (4) February bobble jug (1) January (7) December 2013 (2 ) November (7) October (1) September (2) August (4) July (5) June (8) May (9) April (8) March (10) February ( 10) January (9) December 2012 (5) November bobble jug (5) October (7) September (3) August (5) July (11) June (4) May (7) April (10) March (11) February (1) January bobble jug (6) December 2011 (4) November (6) October (9) September (13) August (15) July (10) June (11) May (10) April (11) March (14) February (13) January (13) December 2010 (13) November (10) October (16 ) September (17) August (12) July (22) June (15) May (12) April (14) March (16) February (17) January (26) December 2009 (16) November (18) October (18) September (24) August (20) July (25) June (25) May (20) April (27) March (29) two January (27) January bobble jug (27) December 2008 (30) November (30) October (32) September (29) August (31) July (32) June (30) May ( 30) April (31) March (31) February (29) January (32) December (32) November 2007 (36) October (13)
How to respond to the latest source code for debugging ASP.NET MVC 4 (Ultimate full concept bobble jug version) (1) alanjiang has written: Hello brother Paul, I thank you for sharing your way in accordance with the operation, and can execute it successfully compiled still unable to MVC's [... Further Reading ...] Office 2013 documents (Word, Excel, PPT) how fast the "Enable Editing" (1) wellxion has written: Paul Brother: not checked "Allow bobble jug my network position of trust in the road "to add a direct network folder path [... Further Reading ...] How to avoid deleting files when remote site deployment using MSDeploy website (3) Will brother Paul has written: frank: I also think it is pretty stupid, bobble jug but he is so used to XD [... Further Reading ...] site is not a simple matter to build cross-browser Web design @ cheat (1) (3) Will brother bobble jug Paul has wrote: timons: Thank you, I have corrected! :) [... Further Reading ...] site is not a simple matter to build cross-browser Web design @ cheat (1) (3) timons has written: There is a small typo: ... after all <of> Do a good choice in CSS Reset ... [... Further Reading ...]
ScottGu's Blog Azure Updates: Web Site ... Azure: ExpressRoute Ded ... Windows Azure: Staging ... ScottGu blog Chinese version of ASP.NET Weblogs Code and Slides from My ... The Web Weekly - Editio ... Content Disposition Bug ... The Code Project Deploying your Own Webs ... Installing and Uninstal ... Upload Files to Library bobble jug ... [notes] dark threads JavaScript and CSS compression packing workers ... to prevent ASP.NET website JavaScript annotations. [..] SignalR bags shooter diary cause Mac Sa ... Download bobble jug OPML file


No comments:

Post a Comment