Solved

is it possible to call a method or whatever in order to make a service do something?

Posted on 2009-04-15
4
158 Views
Last Modified: 2013-11-07
hello experts,

i have a service that does a job once a day,
the schedule is done inside the service.

is it possible to call a method from a service,
in order to make it work when invoque it?

if its possible
any link for a reading on the matter would be appreciated,
i'm looking for an example too,

thank in advance.
0
Comment
Question by:toshi_
  • 3
4 Comments
 
LVL 12

Expert Comment

by:wht1986
ID: 24148752
You can use the ServiceController class and call the ExecuteCommand method to run some custom method on that service.  MS has an example at http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.executecommand.aspx
0
 
LVL 12

Expert Comment

by:wht1986
ID: 24148763
0
 

Author Comment

by:toshi_
ID: 24148778
thank you for your reply wht1986,
i'm gonna look at it if i understand,

i'll be back ;o)

0
 
LVL 12

Accepted Solution

by:
wht1986 earned 250 total points
ID: 24148885
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now