I'm trying to access a service that uses .NET remoting using IronPython.  I have a C# interface, something like:

    interface IUserDB { ...
        MyUser GetUser(string id);
        ....};

I've tried to get a remoted instance of that interface using the following python:
    t = a.GetType("IUserDB")   # This works
    db = System.Runtime.Remoting.RemotingServices.Connect(t, dbServerURL)

But if I try to do anything with db, I get:
SystemError: Type 'IronPython.Runtime.ModuleScope' in Assembly 'IronPython, Version=1.0.60816.1877, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' is not marked as serializable.

I get the same error if I instantiate the remoted object in C# and then try to do anything with it in Python.  My work around is to create a proxy that wraps the remote object in a class that implements IUserDB by passing the calls directly to the wrapped remote object.  Works, but a little ugly.  Any thoughts?

Thanks,
Russell.

_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to