I have implemented a tcp sniffer between the Server application and Client application. I am able to sniff the data whenever there is a method invocation request from from client to server but fail to snif in one scenario..
I am calling a remote method which returns me an object derived from MarshalRefObjects, any get/set/method invocation operation performed on this object is happening on the server side but I am not able to see any data traffic between server & client. Is it using any different channel internally. that's not possible. just a crude thought. I am enclosing the sample code.. Can anyone have a look into it. Client Code ======= using System; using System.Runtime; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; using System.Collections; namespace ClientApp { class ClsClient { [STAThread] static void Main(string[] args) { WellKnownClientTypeEntry[] ColCount; RemotingConfiguration.Configure("ClientApp.exe.config"); ColCount = RemotingConfiguration.GetRegisteredWellKnownClientTypes(); clsBroadCast clientobj = new clsBroadCast(); EmployeeData edata = clientobj.GetEmpClass(); edata.ECode = 12; System.Console.WriteLine(edata.ECode); System.Console.WriteLine("Success"); } } } Client config File ========== <configuration> <system.runtime.remoting> <application> <client> <wellknown type="clsBroadCast, BroadCast" url="tcp://coernd1:10001/clsBroadCast"/> </client> <channels> <channel ref="tcp" port="10001"/> </channels> </application> </system.runtime.remoting> </configuration> Server Listener Code ============= using System; using System.Runtime; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; using ServerApp; namespace ServerApp { public class Class2 { [STAThread] static void Main(string[] args) { TcpServerChannel Channel = new TcpServerChannel(10000); ChannelServices.RegisterChannel(Channel); RemotingConfiguration.RegisterWellKnownServiceType(typeof(clsBroadCast), "clsBroadCast",WellKnownObjectMode.SingleCall); System.Console.WriteLine("Press any key"); System.Console.ReadLine(); } } } Service Code : Assembly Name : BroadCast ============================ using System; public class clsBroadCast : System.MarshalByRefObject { int tstamp; public clsBroadCast() { System.Console.WriteLine("Constructor Called"); } public EmployeeData GetEmpClass() { return new EmployeeData(); } } using System; public class EmployeeData : System.MarshalByRefObject { int empcode; int tstamp; public void SetTime() { tstamp= 150579; } public int GetTime() { return tstamp; } public int ECode { get { System.Console.WriteLine("Get Called"); return empcode; } set { System.Console.WriteLine("Set Called"); empcode = value; } } } Regards, Yogesh S ----------------------------------------------------------------------- Financial Technologies (India) Ltd. www: ftindia.com e-mail: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] +91 22 616 4145 (P) +91 22 612 2342 (F) ------------------------------------------------------------------------ --------------------------------------------- The information in this E-mail (which includes any files transmitted with it) is CONFIDENTIAL and may be legally PRIVILEGED. It is intended solely for the addressee and access to this email by anyone else is unauthorized. If you have received it in error, please destroy any copies of this message, including any attachments, and delete it from your system notifying the sender immediately. Any disclosure, copying, distribution, dissemination, forwarding, printing or any action taken or omitted to be taken in reliance on it or utilizing the same for any purpose other than what it is intended for, is prohibited and may be unlawful. ------------------------------------------------------------------------ --------------------------------------------- You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.