简体   繁体   中英

Call Method on Remote Client

On a remote client I have a WPF Application running.
I want to call a function of this application on the client, with a parameter passed from master.
As far as I understand I have to use a WCF Service.
Is that even possible? Can you point me to some examples? Thank you in advance.

UPDATE: I want to call some time-consuming functions from a server on the clients. From the GUI I can define the IPs of the clients. Then I want to call a specific WCF method on the clients. However the WCF service is created at runtime on the server.

As an example I have a WCF Method that opens a MessageBox. I created a WCF Service and a Self-Hosted REST service for testing. When I call the Function from clients or server, the MessageBox opens on the server. Is it possible to call the method from the server, so that the MessageBox appears on the client and not on the server?

Note: I can call the method from the client's Browser, because of the WebGet attribute of the method.

I don't think i got you, but if you mean you want to call a remote function, then a web service is the solution, which WCF will provide for you.

create a new WCF and employ the method there, then you can simply call it from anywhere while the WCF is up and running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM