Hi Yogesh,

I guess you are using some sniffer which does port forwarding? i.e. you
connect to the sniffer and it then connects to the final destination port
[something like tcpTrace from www.pocketsoap.com].

In this case, the reason why you can't see anything for your second objects
is based on the fact that it's a client-activated object [that is, it is
returned by reference from your first object].

In this case, the server "defines" the endpoint-URL dynamically. It will be
generated based on the server-side channel settings and will include (in the
ObjRef-object) the "real" port number and real IP-Address of the server.

It's unfortunately not possible to use this kind of sniffer with objects
which are returned by reference. You should try proxytrace or pcaptrace
(also from http://www.pocketsoap.com) instead ... but your mileage may vary.
At least when working with client and server on localhost, pcapTrace will
f.e. not work [1]. Proxytrace on the other hand only works when you use
HTTPChannel as it is basically, well, an HTTP proxy which also means that
you have to set the channel's proxy properties!

HTH,
-Ingo

[1] that is, at least I couldn't get it to work on my machine ...

Author of "Advanced .NET Remoting"
http://www.dotnetremoting.cc

> -----Original Message-----
> From: Yogesh Shetty [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 3:07 PM
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] MBR & Serializable
>
>
> 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(clsB
> roadCast),
> "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.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to