[IronPython] GetTypeFromProgID and Remoting issue

Dino Viehland dinov at exchange.microsoft.com
Tue Oct 24 01:54:14 CEST 2006


This one will require a bit of investigation...  Can you give the exception you get whe you just do obj.MyMethod() after the CreateInstance call (w/o the wrapping into the typedproxy)?  If you could get this when running w/ the -X:ExceptionDetails command line switch that'd be very helpful.

It almost sounds like what you're getting back isn't a typical proxy, but I'm not sure how it differs.  Ultimately I'll probably need to setup a simple DCOM object to test it to fully understand what's going on here, but the stack trace might be useful.

Also, have you tried calling through an interface instead of the type?  Sometimes interfaces are little more manageable w/ remoting.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Nick Gerner
Sent: Monday, October 23, 2006 9:33 AM
To: users at lists.ironpython.com
Subject: [IronPython] GetTypeFromProgID and Remoting issue

I run into a problem similar to "Remoting is broken for well-known objects" work item id 470.

But I'm using the following pattern (to access a DCOM object):

>>>t = System.Type.GetTypeFromProgID("Namespace.MyRemoteType", "MyRemoteMachineName")
>>>obj = System.Activator.CreateInstance(t)

I tried the typedproxy helper class workaround for the above workitem issue (when using Activator.GetObject), but it doesn't solve this problem.  I get the following error when using the typedproxy workaround:

>>>Obj.MyMethod()
IronPython.Runtime.Exceptions.ArgumentTypeException: descriptor 'MyMethod' requires a 'MyRemoteType' object but received a 'MarshalByRefObject'

I know this works from c# (without the typed proxy workaround, of course).  Is there an alternate workaround?


I know this question is out of scope here, but, is there an alternate way to access DCOM objects (without doing a .NET publish in a process on the remote machine?


Nick Gerner
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list