Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my requirment
1.In one computer window service is running
2.Another computer c#application is running in c# application if i click a button
3.i want to call window service.

plz help me
Posted

You don't "call" a windows service. You can send it commands (if you have sufficient privileges), and you can probably even set it up to be a WCF server.

Security would be an issue, especially if the computer in question wasn't on the same LAN as you. Performing due diligence in the form of research on your part is suggested. Google is your friend.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 20-Apr-11 19:56pm    
My 5.
I added conceptual explanation of what a "call" is, which could explain why so.
--SA
You'd need the service to provide some means for client-communication. This could be via a TCP server, a remoting service, or even a WCF service.

[Edit]
------

Based on your further responses (which I removed since they need to be comments), here's a good intro article to using WCF:

WCF Introduction - Part1[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 20-Apr-11 19:49pm    
Based on call semantic (which I'm not sure, can only rely of OP's view, it has to be WCF (but classic remoting, too)). My 5.
--SA
Sergey Alexandrovich Kryukov 20-Apr-11 19:56pm    
I added conceptual explanation of what a "call" is, which could explain why so.
--SA
Just an important conceptual note: a notion of "call" is only valid for the code of the same thread (not just the same Application Domain or the same process). The call mechanism is fundamentally based on stack, but different thread use different stacks.

Everything else with call semantic could be inter-thread invocation (withing the same Application Domain) or RPC (Remote Procedure Call, http://en.wikipedia.org/wiki/Remote_procedure_call[^]).

Again, important to understand: even for different processes on the same machine, even for different Application Domain of the same Process it has to be RPC.

With .NET, RPC semantics is implemented with classic remoting or WCF.

—SA
 
Share this answer
 
Comments
Nish Nishant 21-Apr-11 8:39am    
Good points. Voted 5.
Sergey Alexandrovich Kryukov 21-Apr-11 16:22pm    
Thank you, Nishant.
--SA

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