<div> </div>
<div>> Can you provide minimal reproducible code sample for both C# and Python?</div>
<div>Tried uploading a .zip file to GitHub but got error "We don't support that file type." Instead I put a dropbox file link in the issue.</div>
<div><br /> > What is the latest pythonnet version in which this works?</div>
<div>I only ever used pythonnet-2.0-alpha2-clr2.0_131_py27_UCS2 with Python 2.7.2, where it worked when controlling my .Net 3.5-based-based GUI app. I only updated my app to .NET 4.5.2 last week, which is the first time I tried CLR4-compatible PythonDotNet with Python 2.7.12.</div>
<div><br /> > Are you testing this from interactive python or ipython? There are some<br /> differences between the 2 options.<br /> - Command shell:  C:\Python27> python my.py</div>
<div><br /> > Please also open an issue on github.<br /> Done: "<span class="js-issue-title">.NET Remoting support broken </span> <span class="gh-header-number">#276"</span> <br /><br /> > BTW, why have you not switched to WCF?</div>
<div>- Yeah, I know, Remoting is deprecated : (  Need to learn about WCF and see what kind of pain it will cause my long-established user base.</div>
<blockquote class="threadBlockQuote" style="border-left: 2px solid #C2C2C2; padding-left: 3px; margin-left: 4px;">--------- Original Message ---------
<div>Subject: PythonDotNet Digest, Vol 147, Issue 18<br />From: pythondotnet-request@python.org<br />Date: 10/21/16 10:00 am<br />To: pythondotnet@python.org<br /><br />Send PythonDotNet mailing list submissions to<br /> pythondotnet@python.org<br /> <br /> To subscribe or unsubscribe via the World Wide Web, visit<br /> https://mail.python.org/mailman/listinfo/pythondotnet<br /> or, via email, send a message with subject or body 'help' to<br /> pythondotnet-request@python.org<br /> <br /> You can reach the person managing the list at<br /> pythondotnet-owner@python.org<br /> <br /> When replying, please edit your Subject line so it is more specific<br /> than "Re: Contents of PythonDotNet digest..."<br /> <br /> <br /> Today's Topics:<br /> <br /> 1. Support for CLR4 .NET Remoting (pythondotnet)<br /> 2. Re: Support for CLR4 .NET Remoting (Denis Akhiyarov)<br /> <br /> <br /> ----------------------------------------------------------------------<br /> <br /> Message: 1<br /> Date: Thu, 20 Oct 2016 10:38:28 -0700<br /> From: "pythondotnet" <PythonDotNet@jnpcarole.com><br /> To: pythondotnet@python.org<br /> Subject: [Python.NET] Support for CLR4 .NET Remoting<br /> Message-ID:<br /> <20161020103828.3e63f68611bc0deecd5a6dd5fef89a2f.fe160eb814.mailapi@email09.godaddy.com><br /> <br /> Content-Type: text/plain; charset="utf-8"<br /> <br /> Does pythonnet-2.1.0 support .NET Remoting? When I try to get an interface, python 2.7 crashes:<br /> <br /> Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.<br /> at Python.Runtime.ClassDerivedObject.ToPython(IPythonDerivedType obj)<br /> at Python.Runtime.Converter.ToPython(Object value, Type type)<br /> at Python.Runtime.MethodBinder.Invoke(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, MethodInfo[] methodinfo)<br /> at Python.Runtime.MethodObject.Invoke(IntPtr target, IntPtr args, IntPtr kw,MethodBase info)<br /> at Python.Runtime.MethodBinding.tp_call(IntPtr ob, IntPtr args, IntPtr kw)<br /> <br /> It's getting past these lines in my script:<br /> import clr<br /> clr.Addreference(my remoting DLL)<br /> from MyNamespace import *<br /> <br /> and choking on a static method in my app's remoting DLL call which returns the interface. Through logging, I can tell that the code in that static method call is successfully executing:<br /> (IMyInterface)Activator.GetObject(typeof(IMyInterface), url);<br /> and returning the object back to Python.<br /> <br /> This worked fine before when my app targeted .NET 3.5 and I used the CLR2 version of the Python for .NET package. Now my app targets .NET 4.5.2 so I:<br /> - Updated to Python 2.7.12<br /> - Updated the copy of my app's remoting DLL in c:\python27\dll<br /> - Removed the old Python for .NET package<br /> - Executed "pip install pythonnet", which gave me version 2.1.0.<br /> <br /> In C:\Python27\Lib\site-packages\ I see:<br /> clr.pyd<br /> Python.Runtime.dll v 2.0.0.2<br /> Python.Runtime.dll.config<br /> -------------- next part --------------<br /> An HTML attachment was scrubbed...<br /> URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20161020/433148c7/attachment-0001.html><br /> <br /> ------------------------------<br /> <br /> Message: 2<br /> Date: Thu, 20 Oct 2016 13:01:48 -0500<br /> From: Denis Akhiyarov <denis.akhiyarov@gmail.com><br /> To: "A list for users and developers of Python for .NET"<br /> <pythondotnet@python.org><br /> Subject: Re: [Python.NET] Support for CLR4 .NET Remoting<br /> Message-ID:<br /> <CALxxJLQFqkMxSs4FvekYcJMNYikPuWZB3W1u+AW4LCSROyOvBA@mail.gmail.com><br /> Content-Type: text/plain; charset="utf-8"<br /> <br /> Can you provide minimal reproducible code sample for both C# and Python?<br /> What is the latest pythonnet version in which this works?<br /> <br /> Are you testing this from interactive python or ipython? There are some<br /> differences between the 2 options.<br /> <br /> Please also open an issue on github.<br /> <br /> BTW, why have you not switched to WCF?<br /> <br /> Thanks,<br /> Denis<br /> -------------- next part --------------<br /> An HTML attachment was scrubbed...<br /> URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20161020/c7b05f88/attachment-0001.html><br /> <br /> ------------------------------<br /> <br /> Subject: Digest Footer<br /> <br /> _______________________________________________<br /> PythonDotNet mailing list<br /> PythonDotNet@python.org<br /> https://mail.python.org/mailman/listinfo/pythondotnet<br /> <br /> <br /> ------------------------------<br /> <br /> End of PythonDotNet Digest, Vol 147, Issue 18<br /> *********************************************</div>
</blockquote>