[Ironpython-users] Q: Protecting my source in an ASP.NET IronPython application possible?

Jimmy Schementi jschementi at gmail.com
Wed Jul 20 17:29:05 CEST 2011

On Jul 20, 2011, at 11:26 AM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Wed, Jul 20, 2011 at 7:14 AM, Jimmy Schementi <jschementi at gmail.com> wrote:
>> By the way, you're correct that Microsoft.Scripting.AspNet doesn't support loading code-behind from DLLs produced from clr.CompileModules. If anyone really wants this, patches are welcome: https://github.com/IronLanguages/main/tree/master/Hosts/MerlinWeb
> But it does support importing modules compiled with pyc, right?
> In that case, Bernd, put all of your business logic in a separate set
> of Python files (not code-behind) and compile those with pyc. Then,
> from your code-behind files you can clr.AddReference() and import your
> compiled code. This won't protect the code behind files, but the
> code-behind should be very small files that just call into your
> compiled code and thus don't really need to be obfuscated.
> This also has the advantage of decoupling your business logic from the
> web pages, making it easier to maintain and test.
> - Jeff

Yes, you can make the code-behind a pass through to a compiled module.

More information about the Ironpython-users mailing list