Remoting a Hashtable contain a Hashtable ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: A. Burch (a1_dog_at_msn.com)
Date: 05/06/04


Date: Thu, 6 May 2004 16:42:07 -0700

I'm trying to remote a Hashtable (object key, object value). If I make the
object value another Hashtable which has a key and a Struct which is made up
up of a primitives 2- doubles and 1 int) and try to remote the 1st Hashtable
I get this error... How does one remote a hashtable containing a hashtable
like I'm attempting to do?

--------

An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occurred in
mscorlib.dll

Additional information: Cannot find the assembly MBTrade,
Version=1.0.1587.28112, Culture=neutral, PublicKeyToken=null.
---------

What I have is the following, 1.) The inerface, 2.) structure, 3.) code

public interface ITheFilterRemoteObject
{
  void setObject(Hashtable val);
  Hashtable getObject();
}

structure......
[Serializable]
public struct PLowHigh
{
   public double plow;
   public double phigh;
   public int chartpos;
   public PLowHigh(double plow, double phigh, int chartpos)
  {
     this.plow = plow;
     this.phigh = phigh;
     this.chartpos = chartpos;
  }
}

Hashtable FSym;
Hashtable SSym;

PLowHigh[] PLH = new PLowHigh[10];
FSym = new Hashtable();
SSym = new Hashtable();
FSym.Clear();
SSym.Clear();

ITheFilterRemoteObject obj = (ITheFilterRemoteObject)
Activator.GetObject(typeof (ITheFilterRemoteObject),
"tcp://localhost:1313/TheFilterRemoteObject.soap");

SSym = obj.getObject();
for (m=0; m<10; m++)
{
   PLH[m].plow = (double) m + 1.0;
   PLH[m].phigh = (double)m + 1.5;
   PLH[m].chartpos = m;
}
SSym.Add(0, PLH);
FSym.Add("MSFT", SSym);
obj.setObject(FSym);



Relevant Pages

  • [1/2] POHMELFS - network filesystem with local coherent cache.
    ... POHMELFS stands for Parallel Optimized Host Message Exchange ... It allows to mount remote servers to local ... * GNU General Public License for more details. ... +struct pohmelfs_config ...
    (Linux-Kernel)
  • [2/3] Distributed storage. Network state machine.
    ... * GNU General Public License for more details. ... +struct kst_poll_helper ... * This function removes request from state tree and ordering list. ... * which in turn host requests for remote targets. ...
    (Linux-Kernel)
  • Use a struct within a remotingObject
    ... I want to use a self defined struct within a remoteObject in the ... following way to send data from an AddIn in VisualStudio to an AddIn ... public class Remote Object: MarshalByRefObject ... private string name; ...
    (microsoft.public.dotnet.framework.remoting)