[IronPython] Embedded IronPython in .NET C# WinForm app error

Mitch Barnett mbarnett at uniserve.com
Tue Jul 8 13:56:51 CEST 2008


I have a .NET C# WinForm application that hosts an IronPython 1.1 engine.
In the WinForm app, the scripting API is exposed through a web service
interface (using Windows Communication Foundation) so that from a remote
console, (over WCF), I can execute IronPython code on the computer that is
running the WinForm app.

The project is at: http://www.codeplex.com/gsb

Works 99% of the time, but the 1% of the time that it does not work is for
cases like this:

>>> IronPython 1.1 (1.1) on .NET 2.0.50727.1433 
>>> import clr
>>> import sys
>>> sys.path.append(r"c:\projects\gsbservice\gsbservice1")
>>> clr.AddReferenceToFile("AgentServerObjects.dll")
>>> from AgentServerObjects import *
>>> a = AgentServerClass()
Traceback (most recent call last): File C:\Projects\GSBService\GSBService1
\ParseInteractive.cs, line 93, in CallIPCmd File , line 0, in <stdin>##21 
File , line 0, in DefaultNew##22 File , line 0, in .ctor##26 TypeError: 
Creating an instance of the COM component with CLSID
00C04FD7081F} from the IClassFactory failed due to the following error: 

Of course if I try the same thing using the IPY.exe console on the same
computer, using the same AgentServerObjects.dll, it works just fine.

Any thoughts appreciated as to what might be going wrong.



More information about the Ironpython-users mailing list