This question already has answers here:
How can a self-hosted (WinForm ) WCF service interact with the main form?
(3 answers)
Closed 7 years ago.
I have a C# WinForms app which is hosting a WCF service. When I call this service from another app, I want that method in the WCF service to call a method on the Form. I could cast the Form.ActiveForm but this doesn't seem a good way to do it. What would be the best way to call the Form from the hosted WCF service?
You could use events. The form registers to the event while the service triggers the event
I found a better solution elsewhere on StackOverflow. I had previously searched on here before posting my question but missed this one
How can a self-hosted (WinForm ) WCF service interact with the main form?
This works nicely so thought I'd update here.
Related
This question already has answers here:
Hosting WCF service on linux
(2 answers)
Closed 6 years ago.
I want to host a game's server on Linux - Debian8 (a VPS), but I'm having a problem: the game is written in C# and needs IIS to host the WCF part of it, which doesn't work on Linux.
Someone told me that it is possible to host a server on Debian but I should create a WCF stand-alone app.
How can I do that?
Here can you find server files which use WCF.
Could you help me with this? thanks!!
No you don't need IIS
Hosting Services
You can host in a Service console app
This question already has answers here:
What is the simplest method of inter-process communication between 2 C# processes?
(9 answers)
Closed 7 years ago.
How to pass value from a Windows desktop application to another Windows desktop application?
I'm stuck right now. I don't want to build two different forms in one Winform application.
I need two different Winform application that communicates with each other, one of them send value to other one and the receiver processes the data.
Anyone knows how to do that?
I'd be grateful if you can help.
You need to implement interprocess communication, Please check this link What is the simplest method of inter-process communication between 2 C# processes?
in this link you can find multiple options to implement interprocess communication such as:
Windows Communication Foundation
Windows Messages
Also you can use WCF for communicating between applications. Have look WCF - Fastest interprocess communication
If you are familiar with Remote Objects using Services (.Net Remoting), then your two application can communicate using this method.
You can refer to this link:
https://www.daniweb.com/software-development/csharp/code/227615/simple-net-remoting-demonstration
This question already has answers here:
Calling WCF Service from MS Access
(2 answers)
Closed 7 years ago.
We have a WCF Service and now we are having to suppor tit in backward compatibility mode. One of the consumer turns out to be an Access Application. Now, I have personally never worked with Access and not sure if Access has a direct way to consume the WCF services. However, I came across following link:
http://jaliyaudagedara.blogspot.com/2014/02/calling-wcf-service-from-stored.html?m=1
Given the fact that I would be more comfortable working with SQL Server rather than doing any work in Access to do backward compatibility, I found this link as my best shot to backward compatibility.
Are there any other ways that I can approach this problem?
This question has already been asked and answered here:
Calling WCF Service from MS Access
In short, you can call a WCF service exposed via WebHttpBinding (simple HTTP) or BasicHttpBinding (SOAP/HTTP) using XMLHttp (for simple HTTP) or the SOAP Toolkit (for SOAP/HTTP).
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to start a process from windows service into currently logged in user’s session
c# windows service
I have this code in the OnStart Method of the windows service.
System.Diagnostics.Process.Start("notepad.exe");
I am successfully able to start the windows service. However once the service has successfully started it doesn't open the notepad.
This is a strange problem and as i am new to windows services, help is required.
Windows services don't execute in the same context as the desktop.
Hence you won't see the application running in explorer like you would if you launched it normally.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
what is difference with WCF and other web services ?
What are the main difference between web service and wcf service ?
how to call both service?
This is a big question, but a WCF service is much more versatile and can do what a web service can do and much more. See this post for more detailed information regarding this issue.