Solved

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

Posted on 2009-04-15
4
159 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

17 Experts available now in Live!

Get 1:1 Help Now