-1

I have a .NET application that can either run as a console app, or as a Windows service (depending on startup parameters).

The idea here is to have an instance running as a console app to act as a UI for another instance that is running as a service on the same machine. In other words, instance #1 can examine and control the state of instance #2. Both instances are run from the same physical files - there is only one installation of the application.

I need to accomplish this with minimal changes to app, e.g. without creating a WCF services layer (there are a LOT of methods that need to be accessed), so I was wondering if it was possible for the console app to obtain direct code-to-code references to public static objects in the service app.

The public static objects I want access to are in the EXE itself, but could be moved into an assembly loaded by the app if needed.

It sounds like .NET Remoting might be a solution, except for the fact it is discontinued. Is there another possibility?

Laurence
  • 980
  • 12
  • 31
  • What's wrong with WCF? You don't need to "create a layer" you could just use your object as is most likely and simply add the appropriate contracts (it depends on what data types you work with and many other things, we'd need more information) – Ronan Thibaudau Jun 03 '15 at 20:49
  • No - to transfer data between processes you need to have _some_ form of inter-process communication. WCF, Named Pipes, .NET Remoting, a database, a shared file, something, – D Stanley Jun 03 '15 at 20:57

1 Answers1

0

It looks like the answer is NO - this cannot be done.

Laurence
  • 980
  • 12
  • 31