[IronPython] .NET remoting with IronPython
Russell Lear
rrlear at gmail.com
Wed Sep 20 15:55:02 CEST 2006
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060920/e535d2ee/attachment.html>
More information about the Ironpython-users
mailing list