none
Inter process communication between dot net 1.1 application and dot 4.0 application RRS feed

  • Question

  • What is the best option to have a inter process communication between a 1.1 dotnet framework application and 4.0 dotnet framework application?

    Note both application will be on same machine

    Wednesday, April 22, 2020 6:06 PM

All replies

  • Hi,
    In my opinion, WCF can cross the bound of the application domain. Creating a WCF service with netnamedPipebinding is applicable for communication over different applications on the same machine.
    NetNamedPipeBinding binding = new NetNamedPipeBinding();
                binding.Security.Mode = BasicHttpSecurityMode.None;


    Here are some official examples of cross-process communication on the same machine.
    https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/wcf/netnamedpipebinding
    https://docs.microsoft.com/en-us/dotnet/framework/wcf/samples/netnamedpipebinding
    Best Regards
    Abraham Qian
    Thursday, April 23, 2020 3:21 AM
    Moderator
  • The best solution would be for them to communicate without a dependency on what version is at the other end. Most inter-process communication would do that.



    Sam Hobbs
    SimpleSamples.Info


    Thursday, April 23, 2020 7:03 PM
  • Will this WCF service be accessible from the dotNet 1.1 application? I believe WCF was introduced from .net framework 3.0!!
    Thursday, April 23, 2020 9:12 PM
  • You say nothing to allow anyone to help.

    Do you have access to the .Net 1.1 application source? Can you upgrade it? Do you have access to the .Net 4.0 application source? Can you modify it? If you are unable to change either of them then this question is irrelevant. If you are able to change both of them then this question is irrelevant.

    Assuming you are unable to modify the .Net 1.1 application and you can modify the .Net 4.0 application, you need to determine how the .Net 1.1 application communicates then attempt to determine how to modify the .Net 4.0 application to use WCF to communicate with it.



    Sam Hobbs
    SimpleSamples.Info

    Thursday, April 23, 2020 11:02 PM
  • Hey Sam,

                One of the above answer mentioned about using WCF for communication, so I was just curious if that is even possible with .NET 1.1.

                what I am trying to do is that currently the .NET 1.1 assembly (which is referred in other .NET 1.1 application)has web service calls to Server. and since it is in dotnet 1.1 the latest TLS version it can use is the only TLS1.0 . the TLS 1.2 cannot be used with this setup.

     So we are trying to extract this web service call functionality from the referenced dll and put it in some self hosted application(built using dotnet 4.0) which will be doing the web service call thus enabling TLS 1.2 .

    So the solution I am trying to figure out is for the connectivity between the .NET 1.1 assembly and the self hosted application.

    we can make change in the .NET 1.1 assembly but cannot upgrade it to other .NET versions since this would break application which is referencing it.

    Friday, April 24, 2020 6:08 PM
  • One of the above answer mentioned about using WCF for communication, so I was just curious if that is even possible with .NET 1.1.

    This question is in the WCF forum. I assume your correct that you cannot use WCF with .NET 1.1 but whatever communication you do use, you very likely can use WCF in the .Net 4.0 side.

    what I am trying to do is that currently the .NET 1.1 assembly (which is referred in other .NET 1.1 application)has web service calls to Server. and since it is in dotnet 1.1 the latest TLS version it can use is the only TLS1.0 . the TLS 1.2 cannot be used with this setup.

    So we are trying to extract this web service call functionality from the referenced dll and put it in some self hosted application(built using dotnet 4.0) which will be doing the web service call thus enabling TLS 1.2 .

    So the solution I am trying to figure out is for the connectivity between the .NET 1.1 assembly and the self hosted application.

    That is very different from the original question.

    One very crude solution would be to write the data to a file on disk for the purpose of sharing data.

    Similar to that is shared memory using a memory-mapped file (also called file mapping). That can be very efficient; I think it is a common solution used by SQL Server to exchange data with applications.

    See Interprocess Communications - Win32 apps | Microsoft Docs. Those are the Windows API possibilities. Most of them are available in .Net but as you say they require later versions of .Net. You should be able to find samples of doing them in older versions of .Net using DllImport and such.

    The Data Copy (WM_COPYDATA message) would be easy to do. It is more fragile than the other solutions but might be an adequate balance of convenience and reliability.

    Abraham mentioned pipes. You could use pipes, either named or anonymous, but you will need to find examples of using DllImport and such for the .Net 1.1 side. I tried to get pipes working in C# that way and was unsuccessful. You can probably get it working but you will need help.



    Sam Hobbs
    SimpleSamples.Info


    Friday, April 24, 2020 7:19 PM