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
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
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
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