是否有可能到IronPython的asp.net网页表单关联到一个dll文件? [英] Is it possible to associate an IronPython asp.net webform to a dll file?

查看:98
本文介绍了是否有可能到IronPython的asp.net网页表单关联到一个dll文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ASP.NET与一般的ASP模式,你可以通过继承的dll中的类有一个dll的aspx文件的$ C $的CFile。在IronPython中你有另一种模式,并在aspx页面的唯一选项是codefile命令并没有继承。我的问题是,有没有办法一个aspx文件的源文件而不是直接可见的,如DLL或PYC文件关联?

In ASP.NET with the normal ASP model you could have the codefile of the aspx file in a dll by inheriting the class inside the dll. In IronPython you have another model and the only option in the aspx page is "codefile" and there is no "inherits". My question is, is there any way to associate an aspx file to a source file which is not directly viewable such as a dll or a pyc file?

推荐答案

它不能被目前只有IronPython的完成。通过 pyc.py 创建的.dll文件无法使用。当您使用反射检查 - 你没有找到所需的.NET类

It cannot be currently done with just IronPython. The .dll file created by pyc.py cannot be used. When you check it with Reflector - you don't find the necessary .NET classes.

我使用的方法是建立在C#存根创建IronPython的引擎,并运行里面的脚本文件。请参见关于如何使嵌入IronPython的成C#这篇文章

The option I use is to create a stub in C# that creates IronPython engine and run the script file inside it. See this article for how to embedd IronPython into C#.

这篇关于是否有可能到IronPython的asp.net网页表单关联到一个dll文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆