?
Solved

Call a function in a windows service from a web service

Posted on 2005-04-25
4
Medium Priority
?
887 Views
Last Modified: 2010-05-18
I have a windows service that contains a function I want to call from my web service.  I have a web service -> Business Logic Layer -> Data Access Layer.  I want to call the windows service function from my Business logic layer.  Any help on how to do this would be great.  I am writing in VB.net.

Thanks
0
Comment
Question by:Fred Goodwin
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
RealMrTea earned 2000 total points
ID: 13862245
In the windows service, you can override a method called OnCustomCommand.  It takes an integer.  Then, via the System.ServiceProcess.ServiceController you can call the ExecuteCommand method with an integer parameter.  These integers match up...

You can then in your service code perform some operations.

Good Luck,
Eric
0
 
LVL 7

Author Comment

by:Fred Goodwin
ID: 13862425
Thanks for your reply.  Do you have an example that you could show me?  
Thanks
0
 
LVL 7

Expert Comment

by:RealMrTea
ID: 13862451
I have done it before...don't really have any examples I can send you.  It is not too hard.

Check out this site...it seems to have an example you can download.

http://www.thescarms.com/dotNet/WinService.asp

Later,
ERic
0
 
LVL 3

Expert Comment

by:inxni
ID: 13873293
try Remoting
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 9 hours left to enroll

864 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