是否可以将IronPython asp.net webform与dll文件相关联? [英] Is it possible to associate an IronPython asp.net webform to a dll file?

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

问题描述

在具有正常ASP模型的ASP.NET中,您可以通过继承dll中的类,将dll中的aspx文件的代码文件。在IronPython中,您有另一个模型,aspx页面中唯一的选项是codefile,没有继承。我的问题是,有没有办法将aspx文件与不能直接查看的源文件(如dll或pyc文件)相关联?

解决方案

目前无法使用IronPython完成。不能使用由 pyc.py 创建的.dll文件。当您使用Reflector检查时,您没有找到必要的.NET类。



我使用的选项是在C#中创建一个创建IronPython引擎并运行的存根其中的脚本文件。有关如何将IronPython嵌入到C#中,请参阅本文


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?

解决方案

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.

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 webform与dll文件相关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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