|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Check if Service is running?Hi,
can vb check if a windows service is running or not? ( Webclient ) Thanks Joris "Joris De Groote" <joris.degro***@skynet.be> schrieb: On the client or on the server? I doubt that this is possible on the client > can vb check if a windows service is running or not? ( Webclient ) without writing some ugly ActiveX control or .NET Browser Control. Maybe it's better to develop a classic rich-client Windows Forms application instead of a Web application. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> It's a VB.NET program that runs on a server, so it's not a web application.
Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:eC0LLM3cGHA.3840@TK2MSFTNGP04.phx.gbl... > "Joris De Groote" <joris.degro***@skynet.be> schrieb: >> can vb check if a windows service is running or not? ( Webclient ) > > On the client or on the server? I doubt that this is possible on the > client without writing some ugly ActiveX control or .NET Browser Control. > Maybe it's better to develop a classic rich-client Windows Forms > application instead of a Web application. > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> Joris,
If you set a reference to System.ServiceProcess, you could use a function like this one below to check it. I use it in a service of mine to check for dependency services. Function CheckIfServiceIsRunning(ByVal serviceName As String) As Boolean Dim mySC As ServiceProcess.ServiceController mySC = New ServiceProcess.ServiceController(serviceName) If mySC.Status = ServiceProcess.ServiceControllerStatus.Stopped Then ' Service isn't running Return False ElseIf mySC.Status = ServiceProcess.ServiceControllerStatus.Running Then ' Service already running Return True End If End Function You'd also want to put that in a Try Catch block. You'll get an
exception if the service name is invalid IIRC. Thanks
Show quoteHide quote "jayeldee" <jayel***@gmail.com> wrote in message news:1147186678.274759.42120@e56g2000cwe.googlegroups.com... > You'd also want to put that in a Try Catch block. You'll get an > exception if the service name is invalid IIRC. > So you are checking the server to verify this particular service is running
right? -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Joris De Groote" <joris.degro***@skynet.be> wrote in message news:eIRBOT3cGHA.5016@TK2MSFTNGP04.phx.gbl... > It's a VB.NET program that runs on a server, so it's not a web > application. > > > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message > news:eC0LLM3cGHA.3840@TK2MSFTNGP04.phx.gbl... >> "Joris De Groote" <joris.degro***@skynet.be> schrieb: >>> can vb check if a windows service is running or not? ( Webclient ) >> >> On the client or on the server? I doubt that this is possible on the >> client without writing some ugly ActiveX control or .NET Browser Control. >> Maybe it's better to develop a classic rich-client Windows Forms >> application instead of a Web application. >> >> -- >> M S Herfried K. Wagner >> M V P <URL:http://dotnet.mvps.org/> >> V B <URL:http://classicvb.org/petition/> > > Yep
Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:eZG4$C5cGHA.4148@TK2MSFTNGP05.phx.gbl... > So you are checking the server to verify this particular service is > running right? > > > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Joris De Groote" <joris.degro***@skynet.be> wrote in message > news:eIRBOT3cGHA.5016@TK2MSFTNGP04.phx.gbl... >> It's a VB.NET program that runs on a server, so it's not a web >> application. >> >> >> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message >> news:eC0LLM3cGHA.3840@TK2MSFTNGP04.phx.gbl... >>> "Joris De Groote" <joris.degro***@skynet.be> schrieb: >>>> can vb check if a windows service is running or not? ( Webclient ) >>> >>> On the client or on the server? I doubt that this is possible on the >>> client without writing some ugly ActiveX control or .NET Browser >>> Control. Maybe it's better to develop a classic rich-client Windows >>> Forms application instead of a Web application. >>> >>> -- >>> M S Herfried K. Wagner >>> M V P <URL:http://dotnet.mvps.org/> >>> V B <URL:http://classicvb.org/petition/> >> >> > >
How to disable the numericupdown event firing?
Mailmerge Automation Problems VB Form: Controlbox = False byte array size for read or write of filestream Dataset or SQL? wich is faster? Basic Database Questions Using VSS and VS.NET 2003 problem with code for dataset with mutilple tables How to interrupt a running program How to kill a terminal server session (VB.NET) |
|||||||||||||||||||||||