Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
2.00/5 (4 votes)
See more:
Hi,
Can anyone tell me that ....
Can IPC remoting work on two network systems. If yes,the How ? Please help me.
I know about TCP.. it works fine. I want to know about IPC only.

C i am using IPCChannel for remoting under the namespace of System.Runtime.Remoting.Channels.Ipc. and i have made two applications one is server and another is client.I have registered IPCChannel in server with
Portname(9090). server is other system than client. and now i run server. and when i try to connect my client application to server. then i get an erroe...

"Failed to connect an Ipc port"

here is my code with BL part:

//This is my BL part
C#
namespace RTMSyncStatusLib
{
    public interface IRTMSyncStatus
    {
        void SetServiceStatus(string status);
        string GetServiceStatus();
    }
    public class RTMSyncStatus : MarshalByRefObject, IRTMSyncStatus
    {
        private string ServiceStatus = string.Empty;
        public void SetServiceStatus(string status)
        {
            ServiceStatus = status;
        }
        public string GetServiceStatus()
        {
            return ServiceStatus;
        }
    }
}


//This is my server code
C#
IpcChannel channel = new IpcChannel("192.168.2.207:9090");
            ChannelServices.RegisterChannel(channel, false);
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(RTMSyncStatusLib.RTMSyncStatus), "RTMRemoteStatus", WellKnownObjectMode.Singleton);
            Console.WriteLine("RTMSync Ststus Server is ready at "+DateTime.Now.ToString());
            Console.ReadLine();


//This is my client Part
C#
IpcChannel ipcChannel = new IpcChannel();
                ChannelServices.RegisterChannel(ipcChannel, false);
                objRTMStatus = (RTMSyncStatusLib.IRTMSyncStatus)Activator.GetObject(typeof(RTMSyncStatusLib.IRTMSyncStatus), "ipc://192.168.2.207:9090/RTMRemoteStatus");
                if (objRTMStatus != null)
                {
                    timerRTM.Start();
                }
                else
                {
                    MessageBox.Show("Any Problem Occured! or RTMSync Status Server is not running!");
                }


plz c my code. and help me.

Thanks
Posted
Updated 25-Dec-19 23:05pm
v2

1 solution

NO!

IPC it's named pipe.
Can be provided only inside a machine
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900