Problem solve Get help with specific problems with your technologies, process and projects.

Getting data from a project to a class file and Windows service

I have two separate projects. In the first project, I have a form. In the second, I have a class file and Windows service. Is it possible to get data of the form that is in the first project to that Windows Service? If this is not possible, please tell me how to get the value from that form to a class file.
Windows services can expose a remoting server object at a Uri, say tcp://localhost/MyService.rem. The Windows Form can create a new instance of this "remote" object and call a method on it, passing the form data. The method is executed on the service application, where you can do whatever you need. You can start at MSDN on how to expose the remote object, how to configure the "server" (the windows service) and client application (the "form"):

  • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/hawkremoting.asp
  • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/hawkremoting.asp

    Other interesting introductory articles are:

  • http://www.codeproject.com/csharp/DotNetRemotingBasicTutor.asp?target=remoting
  • http://www.codeproject.com/vb/net/RemotingTech.asp?target=remoting
  • Dig Deeper on C# programming language

    Start the conversation

    Send me notifications when other members comment.

    Please create a username to comment.