I’ve been searching for a while for an answer to my problem but so far have found no reliable links. What I’m trying to do is this: I’ve built a Windows .NET GUI application. I’d like to be able to access the functionality of the Form Controls through a Web Service. Are there any good links on how to do this?
Thanks for your help.
You can easily host a Windows Communication Foundation Web service in your WinForms application. See the MSDN article on How to Host a WCF Service in a Managed Application.
Note that if you want your service operations to interact with the UI controls (which I assume is the purpose of having the service in the app — otherwise it’s better to create a normal, non-visual service and host it in IIS or a Windows service) then you will need to use Control.Invoke or Control.BeginInvoke because service operations run on a background thread.