Search code examples
c#.net-core.net-standard.net-framework-version.net-remoting

How to make .Net Core client app communicate to a .Net Framework service using .Net Remoting


I have a .Net Core (3.1) Client application that needs to get data from a .Net Framework (4.6.2) application/service. The .Net Framework service communication was written using the .Net Remoting. From what I understood, .Net Core doesn't support several features from .Net Framework, which includes the .Net Remoting.

How should I make the .Net Core Client application get data from the .Net Framework application? It's not an option to change the .Net Framework service to .Net Core because of some time and expertise constraints on that service.

I'm thinking of creating another library project that is targeted to .Net Standard 2.0. This library will be referenced by the .Net Core Client application. And the .Net Standard Library will still be using the .Net Remoting interface to communicate with the legacy service. Would this work?

Another dumb question, how will the remoting configuration be done? Since it's a library, I cant place a .config file in it. The .config file should be on the client project. But, the client project doesn't have the .config file (it only has the appsettings.json and launchsettings.json). I simply creating/adding a project.config file would work? or is there a .json equivalent structure?


Solution

  • This isn't going to work. You have your core application running on a core CLR. It cannot load a library that's using functionality the depends on running on a non-core CLR.

    You need to change the language that's being talked between the two applications. If you "can't" modify the existing service, then you probably need to write a new application that will act as a proxy. It'll run independently alongside the service and talk remoting to the legacy application, whilst talking e.g. HTTP or something else supported with the .NET core application.