Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can we consume windows service from class library?
I need to access methods in windows service from class library. Can anyone please suggest how do do?
Posted
Updated 18-Jan-12 3:35am
v2

1 solution

You might want to consider created a NetNamedPipe endpoint on your service and controlling the service through that interface. Code looks like:
C#
NetNamedPipeBinding binding = new NetNamedPipeBinding();
MyService myService = new MyService(binding, new EndpointAddress("net.pipe://localhost/MyService"));
myService.ResetTimer(30);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900